class Main{
 
public static void main(String[] args){
  int count5 = 0;
  int count7 = 0;
  
  java.util.Scanner scanner = new java.util.Scanner(System.in);
  
  for(int i = 0; i < 3; i++){
  	String str = scanner.next();
    if(str.equals("5")){
      count5++;
    } else if(str.equals("7")){
      count7++;
    }
  }
  
  if(count5 == 2 && count7 == 1){
  	System.out.println("YES");
  }else {
  	System.out.println("NO");
  }
}
} class Main{
 
public static void main(String[] args){
  int count5 = 0;
  int count7 = 0;
  
  java.util.Scanner scanner = new java.util.Scanner(System.in);
  
  for(int i = 0; i < 3; i++){
  	String str = scanner.next();
    if(str.equals("5")){
      count5++;
    } else if(str.equals("7")){
      count7++;
    }
  }
  
  if(count5 == 2 && count7 == 1){
  	System.out.println("YES");
  }else {
  	System.out.println("NO");
  }
}
} Main public static void main(String[] args){
  int count5 = 0;
  int count7 = 0;
  
  java.util.Scanner scanner = new java.util.Scanner(System.in);
  
  for(int i = 0; i < 3; i++){
  	String str = scanner.next();
    if(str.equals("5")){
      count5++;
    } else if(str.equals("7")){
      count7++;
    }
  }
  
  if(count5 == 2 && count7 == 1){
  	System.out.println("YES");
  }else {
  	System.out.println("NO");
  }
} main {
  int count5 = 0;
  int count7 = 0;
  
  java.util.Scanner scanner = new java.util.Scanner(System.in);
  
  for(int i = 0; i < 3; i++){
  	String str = scanner.next();
    if(str.equals("5")){
      count5++;
    } else if(str.equals("7")){
      count7++;
    }
  }
  
  if(count5 == 2 && count7 == 1){
  	System.out.println("YES");
  }else {
  	System.out.println("NO");
  }
} int count5 = 0; count5 0 int count7 = 0; count7 0 java.util.Scanner scanner = new java.util.Scanner(System.in); scanner new java.util.Scanner(System.in) for(int i = 0; i < 3; i++){
  	String str = scanner.next();
    if(str.equals("5")){
      count5++;
    } else if(str.equals("7")){
      count7++;
    }
  } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
  	String str = scanner.next();
    if(str.equals("5")){
      count5++;
    } else if(str.equals("7")){
      count7++;
    }
  } {
  	String str = scanner.next();
    if(str.equals("5")){
      count5++;
    } else if(str.equals("7")){
      count7++;
    }
  } String str = scanner.next(); str scanner.next() scanner.next scanner if(str.equals("5")){
      count5++;
    } else if(str.equals("7")){
      count7++;
    } str.equals("5") str.equals str "5" {
      count5++;
    } count5++ count5 if(str.equals("7")){
      count7++;
    } str.equals("7") str.equals str "7" {
      count7++;
    } count7++ count7 if(count5 == 2 && count7 == 1){
  	System.out.println("YES");
  }else {
  	System.out.println("NO");
  } count5 == 2 && count7 == 1 count5 == 2 count5 2 count7 == 1 count7 1 {
  	System.out.println("YES");
  } System.out.println("YES") System.out.println System.out System System.out "YES" {
  	System.out.println("NO");
  } System.out.println("NO") System.out.println System.out System System.out "NO" String[] args args
class Main{
 
public static void main(String[] args){
  int count5 = 0;
  int count7 = 0;
  
  java.util.Scanner scanner = new java.util.Scanner(System.in);
  
  for(int i = 0; i < 3; i++){
  	String str = scanner.next();
    if(str.equals("5")){
      count5++;
    } else if(str.equals("7")){
      count7++;
    }
  }
  
  if(count5 == 2 && count7 == 1){
  	System.out.println("YES");
  }else {
  	System.out.println("NO");
  }
}
}