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

public class Main {
	public static void main(String[]args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] a = br.readLine().split(" ");
		int n5 = 0 ;
		int n7 = 0 ;
		for(int i = 0 ; i < a.length ; i++) {
			if(Integer.parseInt(a[i]) == 5)
				n5 ++ ;
			if(Integer.parseInt(a[i]) == 7)
					n7 ++ ;
		}
		if(n5 == 2 && n7 == 1) 
			System.out.println("YES");
		
	   else
		   System.out.println("NO");
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[]args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] a = br.readLine().split(" ");
		int n5 = 0 ;
		int n7 = 0 ;
		for(int i = 0 ; i < a.length ; i++) {
			if(Integer.parseInt(a[i]) == 5)
				n5 ++ ;
			if(Integer.parseInt(a[i]) == 7)
					n7 ++ ;
		}
		if(n5 == 2 && n7 == 1) 
			System.out.println("YES");
		
	   else
		   System.out.println("NO");
	}

} Main public static void main(String[]args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] a = br.readLine().split(" ");
		int n5 = 0 ;
		int n7 = 0 ;
		for(int i = 0 ; i < a.length ; i++) {
			if(Integer.parseInt(a[i]) == 5)
				n5 ++ ;
			if(Integer.parseInt(a[i]) == 7)
					n7 ++ ;
		}
		if(n5 == 2 && n7 == 1) 
			System.out.println("YES");
		
	   else
		   System.out.println("NO");
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] a = br.readLine().split(" ");
		int n5 = 0 ;
		int n7 = 0 ;
		for(int i = 0 ; i < a.length ; i++) {
			if(Integer.parseInt(a[i]) == 5)
				n5 ++ ;
			if(Integer.parseInt(a[i]) == 7)
					n7 ++ ;
		}
		if(n5 == 2 && n7 == 1) 
			System.out.println("YES");
		
	   else
		   System.out.println("NO");
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String[] a = br.readLine().split(" "); a br.readLine().split(" ") br.readLine().split br.readLine() br.readLine br " " int n5 = 0 ; n5 0 int n7 = 0 ; n7 0 for(int i = 0 ; i < a.length ; i++) {
			if(Integer.parseInt(a[i]) == 5)
				n5 ++ ;
			if(Integer.parseInt(a[i]) == 7)
					n7 ++ ;
		} int i = 0 ; int i = 0 ; i 0 i < a.length i a.length a a.length i++ i++ i {
			if(Integer.parseInt(a[i]) == 5)
				n5 ++ ;
			if(Integer.parseInt(a[i]) == 7)
					n7 ++ ;
		} {
			if(Integer.parseInt(a[i]) == 5)
				n5 ++ ;
			if(Integer.parseInt(a[i]) == 7)
					n7 ++ ;
		} if(Integer.parseInt(a[i]) == 5)
				n5 ++ ; Integer.parseInt(a[i]) == 5 Integer.parseInt(a[i]) Integer.parseInt Integer a[i] a i 5 n5 ++ n5 if(Integer.parseInt(a[i]) == 7)
					n7 ++ ; Integer.parseInt(a[i]) == 7 Integer.parseInt(a[i]) Integer.parseInt Integer a[i] a i 7 n7 ++ n7 if(n5 == 2 && n7 == 1) 
			System.out.println("YES");
		
	   else
		   System.out.println("NO"); n5 == 2 && n7 == 1 n5 == 2 n5 2 n7 == 1 n7 1 System.out.println("YES") System.out.println System.out System System.out "YES" 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 IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] a = br.readLine().split(" ");
		int n5 = 0 ;
		int n7 = 0 ;
		for(int i = 0 ; i < a.length ; i++) {
			if(Integer.parseInt(a[i]) == 5)
				n5 ++ ;
			if(Integer.parseInt(a[i]) == 7)
					n7 ++ ;
		}
		if(n5 == 2 && n7 == 1) 
			System.out.println("YES");
		
	   else
		   System.out.println("NO");
	}

} public class Main {
	public static void main(String[]args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] a = br.readLine().split(" ");
		int n5 = 0 ;
		int n7 = 0 ;
		for(int i = 0 ; i < a.length ; i++) {
			if(Integer.parseInt(a[i]) == 5)
				n5 ++ ;
			if(Integer.parseInt(a[i]) == 7)
					n7 ++ ;
		}
		if(n5 == 2 && n7 == 1) 
			System.out.println("YES");
		
	   else
		   System.out.println("NO");
	}

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

public class Main {
	public static void main(String[]args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String[] a = br.readLine().split(" ");
		int n5 = 0 ;
		int n7 = 0 ;
		for(int i = 0 ; i < a.length ; i++) {
			if(Integer.parseInt(a[i]) == 5)
				n5 ++ ;
			if(Integer.parseInt(a[i]) == 7)
					n7 ++ ;
		}
		if(n5 == 2 && n7 == 1) 
			System.out.println("YES");
		
	   else
		   System.out.println("NO");
	}

}
