get_string(String) :- current_input(Input),
     read_string(Input, ' \n', '', _, String).

solve(['7'|A]).
solve([_|A]) :- solve(A).

main :- get_string(Str),string_chars(Str,List),writeln(List),(solve(List)->writeln("Yes");writeln("No")).