import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main{
  public static void main(String [] args)throws Exception{

    BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
    String [] inp = br.readLine().split(" ");
    int a = Integer.parseInt(inp[0]);
	int b = Integer.parseInt(inp[1]);
	int c = Integer.parseInt(inp[2]);
    if(a<5||a>7||b<5||b>7||c<5||c>7){
      System.out.println("NO");
    }else if((a+b+c)==17){
      if(a!=6 &&b!=6 && c!=6){
        System.out.println("YES");
      }else{
        System.out.println("NO");
      }
    }
  	else{
      System.out.println("NO");
    }

    
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main{
  public static void main(String [] args)throws Exception{

    BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
    String [] inp = br.readLine().split(" ");
    int a = Integer.parseInt(inp[0]);
	int b = Integer.parseInt(inp[1]);
	int c = Integer.parseInt(inp[2]);
    if(a<5||a>7||b<5||b>7||c<5||c>7){
      System.out.println("NO");
    }else if((a+b+c)==17){
      if(a!=6 &&b!=6 && c!=6){
        System.out.println("YES");
      }else{
        System.out.println("NO");
      }
    }
  	else{
      System.out.println("NO");
    }

    
  }
} Main public static void main(String [] args)throws Exception{

    BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
    String [] inp = br.readLine().split(" ");
    int a = Integer.parseInt(inp[0]);
	int b = Integer.parseInt(inp[1]);
	int c = Integer.parseInt(inp[2]);
    if(a<5||a>7||b<5||b>7||c<5||c>7){
      System.out.println("NO");
    }else if((a+b+c)==17){
      if(a!=6 &&b!=6 && c!=6){
        System.out.println("YES");
      }else{
        System.out.println("NO");
      }
    }
  	else{
      System.out.println("NO");
    }

    
  } main {

    BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
    String [] inp = br.readLine().split(" ");
    int a = Integer.parseInt(inp[0]);
	int b = Integer.parseInt(inp[1]);
	int c = Integer.parseInt(inp[2]);
    if(a<5||a>7||b<5||b>7||c<5||c>7){
      System.out.println("NO");
    }else if((a+b+c)==17){
      if(a!=6 &&b!=6 && c!=6){
        System.out.println("YES");
      }else{
        System.out.println("NO");
      }
    }
  	else{
      System.out.println("NO");
    }

    
  } BufferedReader br = new BufferedReader (new InputStreamReader(System.in)); br new BufferedReader (new InputStreamReader(System.in)) String [] inp = br.readLine().split(" "); inp br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int a = Integer.parseInt(inp[0]); a Integer.parseInt(inp[0]) Integer.parseInt Integer inp[0] inp 0 int b = Integer.parseInt(inp[1]); b Integer.parseInt(inp[1]) Integer.parseInt Integer inp[1] inp 1 int c = Integer.parseInt(inp[2]); c Integer.parseInt(inp[2]) Integer.parseInt Integer inp[2] inp 2 if(a<5||a>7||b<5||b>7||c<5||c>7){
      System.out.println("NO");
    }else if((a+b+c)==17){
      if(a!=6 &&b!=6 && c!=6){
        System.out.println("YES");
      }else{
        System.out.println("NO");
      }
    }
  	else{
      System.out.println("NO");
    } a<5||a>7||b<5||b>7||c<5||c>7 c<5 b>7 b<5 a<5||a>7||b<5||b>7||c<5||c>7 a<5 a 5 a>7 a 7 b<5 b 5 b>7 b 7 c<5 c 5 c>7 c 7 {
      System.out.println("NO");
    } System.out.println("NO") System.out.println System.out System System.out "NO" if((a+b+c)==17){
      if(a!=6 &&b!=6 && c!=6){
        System.out.println("YES");
      }else{
        System.out.println("NO");
      }
    }
  	else{
      System.out.println("NO");
    } (a+b+c)==17 (a+b+c) a+b+c a b c 17 {
      if(a!=6 &&b!=6 && c!=6){
        System.out.println("YES");
      }else{
        System.out.println("NO");
      }
    } if(a!=6 &&b!=6 && c!=6){
        System.out.println("YES");
      }else{
        System.out.println("NO");
      } a!=6 &&b!=6 && c!=6 a!=6 &&b!=6 && c!=6 a!=6 a 6 b!=6 b 6 c!=6 c 6 {
        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" {
      System.out.println("NO");
    } System.out.println("NO") System.out.println System.out System System.out "NO" String [] args args public class Main{
  public static void main(String [] args)throws Exception{

    BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
    String [] inp = br.readLine().split(" ");
    int a = Integer.parseInt(inp[0]);
	int b = Integer.parseInt(inp[1]);
	int c = Integer.parseInt(inp[2]);
    if(a<5||a>7||b<5||b>7||c<5||c>7){
      System.out.println("NO");
    }else if((a+b+c)==17){
      if(a!=6 &&b!=6 && c!=6){
        System.out.println("YES");
      }else{
        System.out.println("NO");
      }
    }
  	else{
      System.out.println("NO");
    }

    
  }
} public class Main{
  public static void main(String [] args)throws Exception{

    BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
    String [] inp = br.readLine().split(" ");
    int a = Integer.parseInt(inp[0]);
	int b = Integer.parseInt(inp[1]);
	int c = Integer.parseInt(inp[2]);
    if(a<5||a>7||b<5||b>7||c<5||c>7){
      System.out.println("NO");
    }else if((a+b+c)==17){
      if(a!=6 &&b!=6 && c!=6){
        System.out.println("YES");
      }else{
        System.out.println("NO");
      }
    }
  	else{
      System.out.println("NO");
    }

    
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;

public class Main{
  public static void main(String [] args)throws Exception{

    BufferedReader br = new BufferedReader (new InputStreamReader(System.in));
    String [] inp = br.readLine().split(" ");
    int a = Integer.parseInt(inp[0]);
	int b = Integer.parseInt(inp[1]);
	int c = Integer.parseInt(inp[2]);
    if(a<5||a>7||b<5||b>7||c<5||c>7){
      System.out.println("NO");
    }else if((a+b+c)==17){
      if(a!=6 &&b!=6 && c!=6){
        System.out.println("YES");
      }else{
        System.out.println("NO");
      }
    }
  	else{
      System.out.println("NO");
    }

    
  }
}