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

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader input =new BufferedReader (new InputStreamReader (System.in));
		String str = input.readLine( );
		String[] list = str.split(" ");
		int count5 = 0;
		int count7 = 0;

		for(int i=0; i<list.length; i++){
			if(list[i].equals("5")){
				count5 = count5 + 1;
			}else if(list[i].equals("7")){
				count7 = count7 + 1;
			}
		}

		if(count5 == 2 && count7 == 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 input =new BufferedReader (new InputStreamReader (System.in));
		String str = input.readLine( );
		String[] list = str.split(" ");
		int count5 = 0;
		int count7 = 0;

		for(int i=0; i<list.length; i++){
			if(list[i].equals("5")){
				count5 = count5 + 1;
			}else if(list[i].equals("7")){
				count7 = count7 + 1;
			}
		}

		if(count5 == 2 && count7 == 1){
			System.out.println("YES");
		}else{
			System.out.println("NO");
		}
	}

} Main public static void main(String[] args) throws IOException {
		BufferedReader input =new BufferedReader (new InputStreamReader (System.in));
		String str = input.readLine( );
		String[] list = str.split(" ");
		int count5 = 0;
		int count7 = 0;

		for(int i=0; i<list.length; i++){
			if(list[i].equals("5")){
				count5 = count5 + 1;
			}else if(list[i].equals("7")){
				count7 = count7 + 1;
			}
		}

		if(count5 == 2 && count7 == 1){
			System.out.println("YES");
		}else{
			System.out.println("NO");
		}
	} main {
		BufferedReader input =new BufferedReader (new InputStreamReader (System.in));
		String str = input.readLine( );
		String[] list = str.split(" ");
		int count5 = 0;
		int count7 = 0;

		for(int i=0; i<list.length; i++){
			if(list[i].equals("5")){
				count5 = count5 + 1;
			}else if(list[i].equals("7")){
				count7 = count7 + 1;
			}
		}

		if(count5 == 2 && count7 == 1){
			System.out.println("YES");
		}else{
			System.out.println("NO");
		}
	} BufferedReader input =new BufferedReader (new InputStreamReader (System.in)); input new BufferedReader (new InputStreamReader (System.in)) String str = input.readLine( ); str input.readLine( ) input.readLine input String[] list = str.split(" "); list str.split(" ") str.split str " " int count5 = 0; count5 0 int count7 = 0; count7 0 for(int i=0; i<list.length; i++){
			if(list[i].equals("5")){
				count5 = count5 + 1;
			}else if(list[i].equals("7")){
				count7 = count7 + 1;
			}
		} int i=0; int i=0; i 0 i<list.length i list.length list list.length i++ i++ i {
			if(list[i].equals("5")){
				count5 = count5 + 1;
			}else if(list[i].equals("7")){
				count7 = count7 + 1;
			}
		} {
			if(list[i].equals("5")){
				count5 = count5 + 1;
			}else if(list[i].equals("7")){
				count7 = count7 + 1;
			}
		} if(list[i].equals("5")){
				count5 = count5 + 1;
			}else if(list[i].equals("7")){
				count7 = count7 + 1;
			} list[i].equals("5") list[i].equals list[i] list i "5" {
				count5 = count5 + 1;
			} count5 = count5 + 1 count5 count5 + 1 count5 1 if(list[i].equals("7")){
				count7 = count7 + 1;
			} list[i].equals("7") list[i].equals list[i] list i "7" {
				count7 = count7 + 1;
			} count7 = count7 + 1 count7 count7 + 1 count7 1 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 public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader input =new BufferedReader (new InputStreamReader (System.in));
		String str = input.readLine( );
		String[] list = str.split(" ");
		int count5 = 0;
		int count7 = 0;

		for(int i=0; i<list.length; i++){
			if(list[i].equals("5")){
				count5 = count5 + 1;
			}else if(list[i].equals("7")){
				count7 = count7 + 1;
			}
		}

		if(count5 == 2 && count7 == 1){
			System.out.println("YES");
		}else{
			System.out.println("NO");
		}
	}

} public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader input =new BufferedReader (new InputStreamReader (System.in));
		String str = input.readLine( );
		String[] list = str.split(" ");
		int count5 = 0;
		int count7 = 0;

		for(int i=0; i<list.length; i++){
			if(list[i].equals("5")){
				count5 = count5 + 1;
			}else if(list[i].equals("7")){
				count7 = count7 + 1;
			}
		}

		if(count5 == 2 && count7 == 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 input =new BufferedReader (new InputStreamReader (System.in));
		String str = input.readLine( );
		String[] list = str.split(" ");
		int count5 = 0;
		int count7 = 0;

		for(int i=0; i<list.length; i++){
			if(list[i].equals("5")){
				count5 = count5 + 1;
			}else if(list[i].equals("7")){
				count7 = count7 + 1;
			}
		}

		if(count5 == 2 && count7 == 1){
			System.out.println("YES");
		}else{
			System.out.println("NO");
		}
	}

}
