vrin=v,r=map(int,raw_input("").split(' '))
ndha=d,h,a,e=map(int,raw_input("").split(' '))
if r in ndha:
  print("yes")
else:
  print("no")

bdea901d1f647b7b920cfe978275d42b4f5f6091
<mask token>

<mask token>
if r in ndha:
    print('yes')
else:
    print('no')

vrin = v, r = map(int, raw_input('').split(' '))
ndha = d, h, a, e = map(int, raw_input('').split(' '))
if r in ndha:
    print('yes')
else:
    print('no')

vrin=v,r=map(int,raw_input("").split(' '))
ndha=d,h,a,e=map(int,raw_input("").split(' '))
if r in ndha:
  print("yes")
else:
  print("no")
