N = input()

print('Yes') if '7' in N else print('No')

print('Yes') if '7' in input() else print('No')

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

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

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