while 1:

    a=[i+1 for i in range(10)]

    try:b=list(map(int,input().split()))

    except:break

    for i in b:a.remove(i)

    print((['NO','YES'][sum([1 for i in a if sum(b[:2],i)<=20])/7>=0.5]))
while 1:

    a=[i+1 for i in range(10)]

    try:b=list(map(int,input().split()))

    except:break

    for i in b:a.remove(i)

    c=sum(b[:2])

    print((['NO','YES'][sum([1 for i in a if c+i<=20])/7>=0.5]))
while 1:
    a = [i + 1 for i in range(10)]
    try:
        b = list(map(int, input().split()))
    except:
        break
    for i in b:
        a.remove(i)
    print((["NO", "YES"][sum([1 for i in a if sum(b[:2], i) <= 20]) / 7 >= 0.5]))

while 1:
    a = [i + 1 for i in range(10)]
    try:
        b = list(map(int, input().split()))
    except:
        break
    for i in b:
        a.remove(i)
    c = sum(b[:2])
    print((["NO", "YES"][sum([1 for i in a if c + i <= 20]) / 7 >= 0.5]))

-    print((["NO", "YES"][sum([1 for i in a if sum(b[:2], i) <= 20]) / 7 >= 0.5])) +    c = sum(b[:2]) +    print((["NO", "YES"][sum([1 for i in a if c + i <= 20]) / 7 >= 0.5]))