import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        String[] list={sc.next(), sc.next(), sc.next()};
        int five_count=0;
        int seven_count=0;
        for(String l:list){
            if(l.equals("5"))
                five_count++;
            else if(l.equals("7"))
                seven_count++;
        }
        if(five_count==2 && seven_count==1)
            System.out.println("YES");
        else
            System.out.println("NO");
    }
} import java.util.*; util.* java public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        String[] list={sc.next(), sc.next(), sc.next()};
        int five_count=0;
        int seven_count=0;
        for(String l:list){
            if(l.equals("5"))
                five_count++;
            else if(l.equals("7"))
                seven_count++;
        }
        if(five_count==2 && seven_count==1)
            System.out.println("YES");
        else
            System.out.println("NO");
    }
} Main public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        String[] list={sc.next(), sc.next(), sc.next()};
        int five_count=0;
        int seven_count=0;
        for(String l:list){
            if(l.equals("5"))
                five_count++;
            else if(l.equals("7"))
                seven_count++;
        }
        if(five_count==2 && seven_count==1)
            System.out.println("YES");
        else
            System.out.println("NO");
    } main {
        Scanner sc=new Scanner(System.in);
        String[] list={sc.next(), sc.next(), sc.next()};
        int five_count=0;
        int seven_count=0;
        for(String l:list){
            if(l.equals("5"))
                five_count++;
            else if(l.equals("7"))
                seven_count++;
        }
        if(five_count==2 && seven_count==1)
            System.out.println("YES");
        else
            System.out.println("NO");
    } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String[] list={sc.next(), sc.next(), sc.next()}; list {sc.next(), sc.next(), sc.next()} sc.next() sc.next sc sc.next() sc.next sc sc.next() sc.next sc int five_count=0; five_count 0 int seven_count=0; seven_count 0 for(String l:list){
            if(l.equals("5"))
                five_count++;
            else if(l.equals("7"))
                seven_count++;
        } String l list {
            if(l.equals("5"))
                five_count++;
            else if(l.equals("7"))
                seven_count++;
        } {
            if(l.equals("5"))
                five_count++;
            else if(l.equals("7"))
                seven_count++;
        } if(l.equals("5"))
                five_count++;
            else if(l.equals("7"))
                seven_count++; l.equals("5") l.equals l "5" five_count++ five_count if(l.equals("7"))
                seven_count++; l.equals("7") l.equals l "7" seven_count++ seven_count if(five_count==2 && seven_count==1)
            System.out.println("YES");
        else
            System.out.println("NO"); five_count==2 && seven_count==1 five_count==2 five_count 2 seven_count==1 seven_count 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){
        Scanner sc=new Scanner(System.in);
        String[] list={sc.next(), sc.next(), sc.next()};
        int five_count=0;
        int seven_count=0;
        for(String l:list){
            if(l.equals("5"))
                five_count++;
            else if(l.equals("7"))
                seven_count++;
        }
        if(five_count==2 && seven_count==1)
            System.out.println("YES");
        else
            System.out.println("NO");
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        String[] list={sc.next(), sc.next(), sc.next()};
        int five_count=0;
        int seven_count=0;
        for(String l:list){
            if(l.equals("5"))
                five_count++;
            else if(l.equals("7"))
                seven_count++;
        }
        if(five_count==2 && seven_count==1)
            System.out.println("YES");
        else
            System.out.println("NO");
    }
} Main
import java.util.*;

public class Main{
    public static void main(String[] args){
        Scanner sc=new Scanner(System.in);
        String[] list={sc.next(), sc.next(), sc.next()};
        int five_count=0;
        int seven_count=0;
        for(String l:list){
            if(l.equals("5"))
                five_count++;
            else if(l.equals("7"))
                seven_count++;
        }
        if(five_count==2 && seven_count==1)
            System.out.println("YES");
        else
            System.out.println("NO");
    }
}