num = eval(input())

if '7' in list(num):

    print('Yes')

else:

    print('No')

in_set = set(eval(input()))

if '7' in in_set:

    print('Yes')

else:

    print('No')
num = eval(input())
if "7" in list(num):
    print("Yes")
else:
    print("No")

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

-num = eval(input()) -if "7" in list(num): +in_set = set(eval(input())) +if "7" in in_set: