import std.stdio,
       std.algorithm,
       std.array,
       std.conv;

void main(){
    int[] ary = readln.split.to!(int[]);
    ary = array(filter!("a != 5")(ary));
    ary[0] == 7 && ary.length == 1 ? write("YES") : write("NO");
}