把题目要求的所有情况列出来就行。
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int a = sc.nextInt();
int b = sc.nextInt();
int c = sc.nextInt();
if(a == 5 && b ==5 && c == 7) System.out.println("YES");
else if(a == 5 && b ==7 && c == 5) System.out.println("YES");
else if(a == 7 && b ==5 && c == 5) System.out.println("YES");
else System.out.println("NO");
}
}
}