def slove():

    import sys, collections

    input = sys.stdin.readline

    a = dict(collections.Counter(list(map(int, input().rstrip('\n').split()))).most_common())

    print(("YES" if a[5] == 2 and a[7] == 1 else "NO"))





if __name__ == '__main__':

    slove()

def slove():

    import sys

    input = sys.stdin.readline

    a = "".join(sorted(list(map(str, str(input().rstrip('\n')).split()))))

    print(("YES" if a == "557" else "NO"))





if __name__ == '__main__':

    slove()

def slove():
    import sys, collections

    input = sys.stdin.readline
    a = dict(
        collections.Counter(list(map(int, input().rstrip("\n").split()))).most_common()
    )
    print(("YES" if a[5] == 2 and a[7] == 1 else "NO"))


if __name__ == "__main__":
    slove()

def slove():
    import sys

    input = sys.stdin.readline
    a = "".join(sorted(list(map(str, str(input().rstrip("\n")).split()))))
    print(("YES" if a == "557" else "NO"))


if __name__ == "__main__":
    slove()

-    import sys, collections +    import sys -    a = dict( -        collections.Counter(list(map(int, input().rstrip("\n").split()))).most_common() -    ) -    print(("YES" if a[5] == 2 and a[7] == 1 else "NO")) +    a = "".join(sorted(list(map(str, str(input().rstrip("\n")).split())))) +    print(("YES" if a == "557" else "NO"))