dat = []
import collections
for i in range(3):
    a,b = map(int, input().split())
    dat.append(a)
    dat.append(b)
c = collections.Counter(dat)
res = []
for k in c:
    res.append(c[k])
res.sort()
if res == [1,1,2,2]:
    print("YES")
else:
    print("NO") dat = [] dat [] import collections collections for i in range(3):
    a,b = map(int, input().split())
    dat.append(a)
    dat.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 dat.append(a) dat.append dat append a dat.append(b) dat.append dat append b c = collections.Counter(dat) c collections.Counter(dat) collections.Counter collections Counter dat res = [] res [] for k in c:
    res.append(c[k]) k c res.append(c[k]) res.append res append c[k] c k res.sort() res.sort res sort if res == [1,1,2,2]:
    print("YES")
else:
    print("NO") res == [1,1,2,2] res [1,1,2,2] 1 1 2 2 print("YES") print "YES" print("NO") print "NO" res = [] [] res dat = [] [] dat c = collections.Counter(dat) collections.Counter(dat) c a,b = map(int, input().split()) map(int, input().split()) a b = map(int, input().split()) map(int, input().split()) b
dat = []
import collections
for i in range(3):
    a,b = map(int, input().split())
    dat.append(a)
    dat.append(b)
c = collections.Counter(dat)
res = []
for k in c:
    res.append(c[k])
res.sort()
if res == [1,1,2,2]:
    print("YES")
else:
    print("NO")