S = eval(input())

if "7" in S:

    print("Yes")

else:

    print("No")
N = eval(input())

if "7" in N:

    print("Yes")

else:

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

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

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