N=eval(input())

if '7' in N:

    print('Yes')

else:

    print('No')

N=eval(input())



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

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

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