from collections import Counter
lst = []
for i in range(3):
  a, b = map(int, input().split())
  lst.append(a)
  lst.append(b)
if sorted(list(Counter(lst).values())) == [1, 1, 2, 2]:
  print('YES')
else:
  print('NO') from collections import Counter lst = [] lst [] for i in range(3):
  a, b = map(int, input().split())
  lst.append(a)
  lst.append(b) i range(3) range 3 a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b lst.append(a) lst.append lst append a lst.append(b) lst.append lst append b if sorted(list(Counter(lst).values())) == [1, 1, 2, 2]:
  print('YES')
else:
  print('NO') sorted(list(Counter(lst).values())) == [1, 1, 2, 2] sorted(list(Counter(lst).values())) sorted list(Counter(lst).values()) list Counter(lst).values() (lst).values (lst) Counter lst values [1, 1, 2, 2] 1 1 2 2 print('YES') print 'YES' print('NO') print 'NO' lst = [] [] lst a, b = map(int, input().split()) map(int, input().split()) a b = map(int, input().split()) map(int, input().split()) b
from collections import Counter
lst = []
for i in range(3):
  a, b = map(int, input().split())
  lst.append(a)
  lst.append(b)
if sorted(list(Counter(lst).values())) == [1, 1, 2, 2]:
  print('YES')
else:
  print('NO')