N=eval(input())



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

  print("Yes")

else:

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

if "7" in s:

  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")

s = eval(input())
if "7" in s:
    print("Yes")
else:
    print("No")

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