N = eval(input())

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

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

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