A = sorted(sorted(map(int, input().split())) for i in range(6))
if all(a==b for a, b in zip(A[::2], A[1::2])):
    p, q, r = A[::2]
    if (p[0] in q and p[1] in r and q[q.index(p[0])^1] == r[r.index(p[1])^1]) or (p[0] in r and p[1] in q and r[r.index(p[0])^1] == q[q.index(p[1])^1]):
        print("yes")
else:
    print("no")