k = eval(input())



if "7" in k:

    print("Yes")

else:

    print("No")
if "7" in eval(input()):

    print("Yes")

else:

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

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

-k = eval(input()) -if "7" in k: +if "7" in eval(input()):