var input_lines = [Int]()
while let input = readLine() { input_lines += [input] }

var five_count = 0
var seven_count = 0

input_lines.forEach { (input: String) in
    switch input {
    case 5:
        five_count += 1
    case 7:
        seven_count += 1
    default:
        break
    }
}

print(five_count == 2 && seven_count == 1 ? "YES" : "NO")
