n = list(eval(input()))

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

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

-n = list(eval(input())) -print(("Yes" if "7" in n else "No")) +print(("Yes" if "7" in list(eval(input())) else "No"))