N = int(eval(input()))



ans = False

for _ in range(3):

    s = N % 10

    # print(s)

    if s == 7:

        ans = True

    N //= 10



if ans:

    print('Yes')

else:

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



ans = False

for i in range(3):

    if N[i] == '7':

        ans = True



if ans:

    print('Yes')

else:

    print('No')
N = int(eval(input()))
ans = False
for _ in range(3):
    s = N % 10
    # print(s)
    if s == 7:
        ans = True
    N //= 10
if ans:
    print("Yes")
else:
    print("No")

N = eval(input())
ans = False
for i in range(3):
    if N[i] == "7":
        ans = True
if ans:
    print("Yes")
else:
    print("No")

-N = int(eval(input())) +N = eval(input()) -for _ in range(3): -    s = N % 10 -    # print(s) -    if s == 7: +for i in range(3): +    if N[i] == "7": -    N //= 10