import std.stdio, std.string, std.conv, std.range, std.algorithm;

void main() {
  auto abc = readln.chomp.split.map!(to!int);
  if (count(abc, 5) == 2 && count(abc, 7) == 1) {
    "YES".writeln;
  } else {
    "NO".writeln;
  }
}
