import java.util.Scanner;

public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	String[] values = sc.nextLine().split(" ");
      	int countFor7 = 0;
      	int countFor5 = 0;
      	
      	for(String value: values) {
      		if ("7".equals(value)) {
				countFor7++;
			}else if("5".equals(value)) {
				countFor5++;
			}
      	}
      	
      	System.out.println((countFor5 == 2 && countFor7 == 1)? "YES": "NO");
      
	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	String[] values = sc.nextLine().split(" ");
      	int countFor7 = 0;
      	int countFor5 = 0;
      	
      	for(String value: values) {
      		if ("7".equals(value)) {
				countFor7++;
			}else if("5".equals(value)) {
				countFor5++;
			}
      	}
      	
      	System.out.println((countFor5 == 2 && countFor7 == 1)? "YES": "NO");
      
	}

} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	String[] values = sc.nextLine().split(" ");
      	int countFor7 = 0;
      	int countFor5 = 0;
      	
      	for(String value: values) {
      		if ("7".equals(value)) {
				countFor7++;
			}else if("5".equals(value)) {
				countFor5++;
			}
      	}
      	
      	System.out.println((countFor5 == 2 && countFor7 == 1)? "YES": "NO");
      
	} main {
		Scanner sc = new Scanner(System.in);
      	String[] values = sc.nextLine().split(" ");
      	int countFor7 = 0;
      	int countFor5 = 0;
      	
      	for(String value: values) {
      		if ("7".equals(value)) {
				countFor7++;
			}else if("5".equals(value)) {
				countFor5++;
			}
      	}
      	
      	System.out.println((countFor5 == 2 && countFor7 == 1)? "YES": "NO");
      
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String[] values = sc.nextLine().split(" "); values sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " int countFor7 = 0; countFor7 0 int countFor5 = 0; countFor5 0 for(String value: values) {
      		if ("7".equals(value)) {
				countFor7++;
			}else if("5".equals(value)) {
				countFor5++;
			}
      	} String value values {
      		if ("7".equals(value)) {
				countFor7++;
			}else if("5".equals(value)) {
				countFor5++;
			}
      	} {
      		if ("7".equals(value)) {
				countFor7++;
			}else if("5".equals(value)) {
				countFor5++;
			}
      	} if ("7".equals(value)) {
				countFor7++;
			}else if("5".equals(value)) {
				countFor5++;
			} "7".equals(value) "7".equals "7" value {
				countFor7++;
			} countFor7++ countFor7 if("5".equals(value)) {
				countFor5++;
			} "5".equals(value) "5".equals "5" value {
				countFor5++;
			} countFor5++ countFor5 System.out.println((countFor5 == 2 && countFor7 == 1)? "YES": "NO") System.out.println System.out System System.out (countFor5 == 2 && countFor7 == 1)? "YES": "NO" (countFor5 == 2 && countFor7 == 1) countFor5 == 2 countFor5 2 countFor7 == 1 countFor7 1 "YES" "NO" String[] args args public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	String[] values = sc.nextLine().split(" ");
      	int countFor7 = 0;
      	int countFor5 = 0;
      	
      	for(String value: values) {
      		if ("7".equals(value)) {
				countFor7++;
			}else if("5".equals(value)) {
				countFor5++;
			}
      	}
      	
      	System.out.println((countFor5 == 2 && countFor7 == 1)? "YES": "NO");
      
	}

} public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	String[] values = sc.nextLine().split(" ");
      	int countFor7 = 0;
      	int countFor5 = 0;
      	
      	for(String value: values) {
      		if ("7".equals(value)) {
				countFor7++;
			}else if("5".equals(value)) {
				countFor5++;
			}
      	}
      	
      	System.out.println((countFor5 == 2 && countFor7 == 1)? "YES": "NO");
      
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
      	String[] values = sc.nextLine().split(" ");
      	int countFor7 = 0;
      	int countFor5 = 0;
      	
      	for(String value: values) {
      		if ("7".equals(value)) {
				countFor7++;
			}else if("5".equals(value)) {
				countFor5++;
			}
      	}
      	
      	System.out.println((countFor5 == 2 && countFor7 == 1)? "YES": "NO");
      
	}

}
