n = eval(input())

if n[0] == '7' or n[1] == '7' or n[2] == '7':

    print('Yes')

else:

    print('No')

n = eval(input())

n = n.count('7')

if n >= 1:

    print('Yes')

else:

    print('No')

    
n = eval(input())
if n[0] == "7" or n[1] == "7" or n[2] == "7":
    print("Yes")
else:
    print("No")

n = eval(input())
n = n.count("7")
if n >= 1:
    print("Yes")
else:
    print("No")

-if n[0] == "7" or n[1] == "7" or n[2] == "7": +n = n.count("7") +if n >= 1: