num = eval(input());



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

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

num = eval(input())
if num[0] == "7" or num[1] == "7" or num[2] == "7":
    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")

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