import java.util.*;
import java.io.*;

public class Main
{
	public static void main(String [] args) throws IOException
    {
    	BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
 		String [] anArray = reader.readLine().split(" ");
      
      	int counterFor7 = 0;
        int counterFor5 = 0;
      
      	for(int i = 0; i < anArray.length; i++)
        {
        	if(Integer.parseInt(anArray[i]) == 7)
            {
            	counterFor7++;
            }
            else if(Integer.parseInt(anArray[i]) == 5)
            {
            	counterFor5++;
            }
        }
      
      	if(counterFor7 == 1 && counterFor5 == 2)
        {
        	System.out.println("YES");
        }
      	else
        {
        	System.out.println("NO");
        }
    }
} import java.util.*; util.* java import java.io.*; io.* java public class Main
{
	public static void main(String [] args) throws IOException
    {
    	BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
 		String [] anArray = reader.readLine().split(" ");
      
      	int counterFor7 = 0;
        int counterFor5 = 0;
      
      	for(int i = 0; i < anArray.length; i++)
        {
        	if(Integer.parseInt(anArray[i]) == 7)
            {
            	counterFor7++;
            }
            else if(Integer.parseInt(anArray[i]) == 5)
            {
            	counterFor5++;
            }
        }
      
      	if(counterFor7 == 1 && counterFor5 == 2)
        {
        	System.out.println("YES");
        }
      	else
        {
        	System.out.println("NO");
        }
    }
} Main public static void main(String [] args) throws IOException
    {
    	BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
 		String [] anArray = reader.readLine().split(" ");
      
      	int counterFor7 = 0;
        int counterFor5 = 0;
      
      	for(int i = 0; i < anArray.length; i++)
        {
        	if(Integer.parseInt(anArray[i]) == 7)
            {
            	counterFor7++;
            }
            else if(Integer.parseInt(anArray[i]) == 5)
            {
            	counterFor5++;
            }
        }
      
      	if(counterFor7 == 1 && counterFor5 == 2)
        {
        	System.out.println("YES");
        }
      	else
        {
        	System.out.println("NO");
        }
    } main {
    	BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
 		String [] anArray = reader.readLine().split(" ");
      
      	int counterFor7 = 0;
        int counterFor5 = 0;
      
      	for(int i = 0; i < anArray.length; i++)
        {
        	if(Integer.parseInt(anArray[i]) == 7)
            {
            	counterFor7++;
            }
            else if(Integer.parseInt(anArray[i]) == 5)
            {
            	counterFor5++;
            }
        }
      
      	if(counterFor7 == 1 && counterFor5 == 2)
        {
        	System.out.println("YES");
        }
      	else
        {
        	System.out.println("NO");
        }
    } BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) String [] anArray = reader.readLine().split(" "); anArray reader.readLine().split(" ") reader.readLine().split reader.readLine() reader.readLine reader " " int counterFor7 = 0; counterFor7 0 int counterFor5 = 0; counterFor5 0 for(int i = 0; i < anArray.length; i++)
        {
        	if(Integer.parseInt(anArray[i]) == 7)
            {
            	counterFor7++;
            }
            else if(Integer.parseInt(anArray[i]) == 5)
            {
            	counterFor5++;
            }
        } int i = 0; int i = 0; i 0 i < anArray.length i anArray.length anArray anArray.length i++ i++ i {
        	if(Integer.parseInt(anArray[i]) == 7)
            {
            	counterFor7++;
            }
            else if(Integer.parseInt(anArray[i]) == 5)
            {
            	counterFor5++;
            }
        } {
        	if(Integer.parseInt(anArray[i]) == 7)
            {
            	counterFor7++;
            }
            else if(Integer.parseInt(anArray[i]) == 5)
            {
            	counterFor5++;
            }
        } if(Integer.parseInt(anArray[i]) == 7)
            {
            	counterFor7++;
            }
            else if(Integer.parseInt(anArray[i]) == 5)
            {
            	counterFor5++;
            } Integer.parseInt(anArray[i]) == 7 Integer.parseInt(anArray[i]) Integer.parseInt Integer anArray[i] anArray i 7 {
            	counterFor7++;
            } counterFor7++ counterFor7 if(Integer.parseInt(anArray[i]) == 5)
            {
            	counterFor5++;
            } Integer.parseInt(anArray[i]) == 5 Integer.parseInt(anArray[i]) Integer.parseInt Integer anArray[i] anArray i 5 {
            	counterFor5++;
            } counterFor5++ counterFor5 if(counterFor7 == 1 && counterFor5 == 2)
        {
        	System.out.println("YES");
        }
      	else
        {
        	System.out.println("NO");
        } counterFor7 == 1 && counterFor5 == 2 counterFor7 == 1 counterFor7 1 counterFor5 == 2 counterFor5 2 {
        	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 reader = new BufferedReader(new InputStreamReader(System.in));
 		String [] anArray = reader.readLine().split(" ");
      
      	int counterFor7 = 0;
        int counterFor5 = 0;
      
      	for(int i = 0; i < anArray.length; i++)
        {
        	if(Integer.parseInt(anArray[i]) == 7)
            {
            	counterFor7++;
            }
            else if(Integer.parseInt(anArray[i]) == 5)
            {
            	counterFor5++;
            }
        }
      
      	if(counterFor7 == 1 && counterFor5 == 2)
        {
        	System.out.println("YES");
        }
      	else
        {
        	System.out.println("NO");
        }
    }
} public class Main
{
	public static void main(String [] args) throws IOException
    {
    	BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
 		String [] anArray = reader.readLine().split(" ");
      
      	int counterFor7 = 0;
        int counterFor5 = 0;
      
      	for(int i = 0; i < anArray.length; i++)
        {
        	if(Integer.parseInt(anArray[i]) == 7)
            {
            	counterFor7++;
            }
            else if(Integer.parseInt(anArray[i]) == 5)
            {
            	counterFor5++;
            }
        }
      
      	if(counterFor7 == 1 && counterFor5 == 2)
        {
        	System.out.println("YES");
        }
      	else
        {
        	System.out.println("NO");
        }
    }
} Main
import java.util.*;
import java.io.*;

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