N = eval(input())

print(("Yes" if N.find("7") >= 0 else "No"))
N = eval(input())

print(("Yes" if "7" in N else "No"))
N = eval(input())
print(("Yes" if N.find("7") >= 0 else "No"))

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

-print(("Yes" if N.find("7") >= 0 else "No")) +print(("Yes" if "7" in N else "No"))