print(("Yes" if "7" in eval(input()) else "No"))
print(("YNeos"[not'7'in eval(input())::2]))
print(("Yes" if "7" in eval(input()) else "No"))

print(("YNeos"[not "7" in eval(input()) :: 2]))

-print(("Yes" if "7" in eval(input()) else "No")) +print(("YNeos"[not "7" in eval(input()) :: 2]))