l1=[int(i) for i in input().split()]
l2=[int(i) for i in input().split()]
s1=set(l1)
p=len(s1)
s2=s1.union(set(l2))
if(p==len(s2)):
    print("Yes")
else:
    print("No")    

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: