
import java.util.Scanner;

/**
 * Hello world!
 *
 */
public class Main
{
    public static void main( String[] args )
    {
		Scanner scanner = new Scanner (System.in);
		String input = scanner.nextLine();

		IrohaAndEasy solver = new IrohaAndEasy();

		System.out.println(solver.solve(input));

    }

    static class IrohaAndEasy {

    	public String solve(String input) {

    		String answer;
    		String abc[] = input.split(" ");
    		int five = 0;
    		int seven = 0;
    		int other = 0;

    		for(String n :abc) {
    			Integer i = new Integer(n);
    			if( i== 5) {
    				five++;
    			} else if(i == 7) {
    				seven++;
    			} else {
    				other++;
    			}
    		}

    		if(five == 2 && seven == 1) {
    			answer = "YES";
    		} else {
    			answer = "NO";
    		}
    		return answer;
    	}

    }

} import java.util.Scanner; Scanner java.util public class Main
{
    public static void main( String[] args )
    {
		Scanner scanner = new Scanner (System.in);
		String input = scanner.nextLine();

		IrohaAndEasy solver = new IrohaAndEasy();

		System.out.println(solver.solve(input));

    }

    static class IrohaAndEasy {

    	public String solve(String input) {

    		String answer;
    		String abc[] = input.split(" ");
    		int five = 0;
    		int seven = 0;
    		int other = 0;

    		for(String n :abc) {
    			Integer i = new Integer(n);
    			if( i== 5) {
    				five++;
    			} else if(i == 7) {
    				seven++;
    			} else {
    				other++;
    			}
    		}

    		if(five == 2 && seven == 1) {
    			answer = "YES";
    		} else {
    			answer = "NO";
    		}
    		return answer;
    	}

    }

} Main public static void main( String[] args )
    {
		Scanner scanner = new Scanner (System.in);
		String input = scanner.nextLine();

		IrohaAndEasy solver = new IrohaAndEasy();

		System.out.println(solver.solve(input));

    } main {
		Scanner scanner = new Scanner (System.in);
		String input = scanner.nextLine();

		IrohaAndEasy solver = new IrohaAndEasy();

		System.out.println(solver.solve(input));

    } Scanner scanner = new Scanner (System.in); scanner new Scanner (System.in) String input = scanner.nextLine(); input scanner.nextLine() scanner.nextLine scanner IrohaAndEasy solver = new IrohaAndEasy(); solver new IrohaAndEasy() System.out.println(solver.solve(input)) System.out.println System.out System System.out solver.solve(input) solver.solve solver input String[] args args static class IrohaAndEasy {

    	public String solve(String input) {

    		String answer;
    		String abc[] = input.split(" ");
    		int five = 0;
    		int seven = 0;
    		int other = 0;

    		for(String n :abc) {
    			Integer i = new Integer(n);
    			if( i== 5) {
    				five++;
    			} else if(i == 7) {
    				seven++;
    			} else {
    				other++;
    			}
    		}

    		if(five == 2 && seven == 1) {
    			answer = "YES";
    		} else {
    			answer = "NO";
    		}
    		return answer;
    	}

    } IrohaAndEasy public String solve(String input) {

    		String answer;
    		String abc[] = input.split(" ");
    		int five = 0;
    		int seven = 0;
    		int other = 0;

    		for(String n :abc) {
    			Integer i = new Integer(n);
    			if( i== 5) {
    				five++;
    			} else if(i == 7) {
    				seven++;
    			} else {
    				other++;
    			}
    		}

    		if(five == 2 && seven == 1) {
    			answer = "YES";
    		} else {
    			answer = "NO";
    		}
    		return answer;
    	} solve {

    		String answer;
    		String abc[] = input.split(" ");
    		int five = 0;
    		int seven = 0;
    		int other = 0;

    		for(String n :abc) {
    			Integer i = new Integer(n);
    			if( i== 5) {
    				five++;
    			} else if(i == 7) {
    				seven++;
    			} else {
    				other++;
    			}
    		}

    		if(five == 2 && seven == 1) {
    			answer = "YES";
    		} else {
    			answer = "NO";
    		}
    		return answer;
    	} String answer; answer String abc[] = input.split(" "); abc input.split(" ") input.split input " " int five = 0; five 0 int seven = 0; seven 0 int other = 0; other 0 for(String n :abc) {
    			Integer i = new Integer(n);
    			if( i== 5) {
    				five++;
    			} else if(i == 7) {
    				seven++;
    			} else {
    				other++;
    			}
    		} String n abc {
    			Integer i = new Integer(n);
    			if( i== 5) {
    				five++;
    			} else if(i == 7) {
    				seven++;
    			} else {
    				other++;
    			}
    		} {
    			Integer i = new Integer(n);
    			if( i== 5) {
    				five++;
    			} else if(i == 7) {
    				seven++;
    			} else {
    				other++;
    			}
    		} Integer i = new Integer(n); i new Integer(n) if( i== 5) {
    				five++;
    			} else if(i == 7) {
    				seven++;
    			} else {
    				other++;
    			} i== 5 i 5 {
    				five++;
    			} five++ five if(i == 7) {
    				seven++;
    			} else {
    				other++;
    			} i == 7 i 7 {
    				seven++;
    			} seven++ seven {
    				other++;
    			} other++ other if(five == 2 && seven == 1) {
    			answer = "YES";
    		} else {
    			answer = "NO";
    		} five == 2 && seven == 1 five == 2 five 2 seven == 1 seven 1 {
    			answer = "YES";
    		} answer = "YES" answer "YES" {
    			answer = "NO";
    		} answer = "NO" answer "NO" return answer; answer String input input public class Main
{
    public static void main( String[] args )
    {
		Scanner scanner = new Scanner (System.in);
		String input = scanner.nextLine();

		IrohaAndEasy solver = new IrohaAndEasy();

		System.out.println(solver.solve(input));

    }

    static class IrohaAndEasy {

    	public String solve(String input) {

    		String answer;
    		String abc[] = input.split(" ");
    		int five = 0;
    		int seven = 0;
    		int other = 0;

    		for(String n :abc) {
    			Integer i = new Integer(n);
    			if( i== 5) {
    				five++;
    			} else if(i == 7) {
    				seven++;
    			} else {
    				other++;
    			}
    		}

    		if(five == 2 && seven == 1) {
    			answer = "YES";
    		} else {
    			answer = "NO";
    		}
    		return answer;
    	}

    }

} public class Main
{
    public static void main( String[] args )
    {
		Scanner scanner = new Scanner (System.in);
		String input = scanner.nextLine();

		IrohaAndEasy solver = new IrohaAndEasy();

		System.out.println(solver.solve(input));

    }

    static class IrohaAndEasy {

    	public String solve(String input) {

    		String answer;
    		String abc[] = input.split(" ");
    		int five = 0;
    		int seven = 0;
    		int other = 0;

    		for(String n :abc) {
    			Integer i = new Integer(n);
    			if( i== 5) {
    				five++;
    			} else if(i == 7) {
    				seven++;
    			} else {
    				other++;
    			}
    		}

    		if(five == 2 && seven == 1) {
    			answer = "YES";
    		} else {
    			answer = "NO";
    		}
    		return answer;
    	}

    }

} Main

import java.util.Scanner;

/**
 * Hello world!
 *
 */
public class Main
{
    public static void main( String[] args )
    {
		Scanner scanner = new Scanner (System.in);
		String input = scanner.nextLine();

		IrohaAndEasy solver = new IrohaAndEasy();

		System.out.println(solver.solve(input));

    }

    static class IrohaAndEasy {

    	public String solve(String input) {

    		String answer;
    		String abc[] = input.split(" ");
    		int five = 0;
    		int seven = 0;
    		int other = 0;

    		for(String n :abc) {
    			Integer i = new Integer(n);
    			if( i== 5) {
    				five++;
    			} else if(i == 7) {
    				seven++;
    			} else {
    				other++;
    			}
    		}

    		if(five == 2 && seven == 1) {
    			answer = "YES";
    		} else {
    			answer = "NO";
    		}
    		return answer;
    	}

    }

}
