x=eval(input())

if x[0] == "7" or x[1] == "7" or x[2] == "7":

    print("Yes")

else:

    print("No")
s=eval(input())



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

  print("Yes")

else:

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

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

-x = eval(input()) -if x[0] == "7" or x[1] == "7" or x[2] == "7": +s = eval(input()) +if s[0] == "7" or s[1] == "7" or s[2] == "7":