N=str(eval(input()))

if int(N[0])==7:

    print("Yes")

elif int(N[1])==7:

    print("Yes")

elif int(N[2])==7:

    print("Yes")

else:

    print("No")

N=str(eval(input()))

if int(N[0])==7 or int(N[1])==7 or int(N[2])==7:

    print("Yes")

else:

    print("No")
N = str(eval(input()))
if int(N[0]) == 7:
    print("Yes")
elif int(N[1]) == 7:
    print("Yes")
elif int(N[2]) == 7:
    print("Yes")
else:
    print("No")

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

-if int(N[0]) == 7: -    print("Yes") -elif int(N[1]) == 7: -    print("Yes") -elif int(N[2]) == 7: +if int(N[0]) == 7 or int(N[1]) == 7 or int(N[2]) == 7: