Iroha loves _Haiku_. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with 5, 7 and 5 syllables, in this order.  To create a Haiku, Iroha has come up with three different phrases. These phrases have A, B and C syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.
A, B, C = map(int,input('>>').split())

if A == 5:
    if B == 7:
        if C == 5:
            print('YES')
        else:
            print('NO')
    elif B == 5:
        if C == 7:
            print('YES')
        else:
            print('NO')
    else:
        print('NO')
elif A == 7:
    if B == 5:
        if C == 5:
            print('YES')
        else:
            print('NO')
    else:
        print('NO')
else:
    print('NO')
A, B, C = map(int,input().split())

if A == 5:
    if B == 7:
        if C == 5:
            print('YES')
        else:
            print('NO')
    elif B == 5:
        if C == 7:
            print('YES')
        else:
            print('NO')
    else:
        print('NO')
elif A == 7:
    if B == 5:
        if C == 5:
            print('YES')
        else:
            print('NO')
    else:
        print('NO')
else:
    print('NO')