import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    int five = 0;
    int seven = 0;
    for (int i = 0; i < 3; i++) {
      int n = sc.nextInt();
      if (n == 5) {
        five++;
      } else if (n == 7) {
        seven++;
      }
    }
    System.out.println(five == 2 && seven == 1 ? "YES" : "NO");
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    int five = 0;
    int seven = 0;
    for (int i = 0; i < 3; i++) {
      int n = sc.nextInt();
      if (n == 5) {
        five++;
      } else if (n == 7) {
        seven++;
      }
    }
    System.out.println(five == 2 && seven == 1 ? "YES" : "NO");
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    int five = 0;
    int seven = 0;
    for (int i = 0; i < 3; i++) {
      int n = sc.nextInt();
      if (n == 5) {
        five++;
      } else if (n == 7) {
        seven++;
      }
    }
    System.out.println(five == 2 && seven == 1 ? "YES" : "NO");
  } main {
    Scanner sc = new Scanner(System.in);
    
    int five = 0;
    int seven = 0;
    for (int i = 0; i < 3; i++) {
      int n = sc.nextInt();
      if (n == 5) {
        five++;
      } else if (n == 7) {
        seven++;
      }
    }
    System.out.println(five == 2 && seven == 1 ? "YES" : "NO");
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int five = 0; five 0 int seven = 0; seven 0 for (int i = 0; i < 3; i++) {
      int n = sc.nextInt();
      if (n == 5) {
        five++;
      } else if (n == 7) {
        seven++;
      }
    } int i = 0; int i = 0; i 0 i < 3 i 3 i++ i++ i {
      int n = sc.nextInt();
      if (n == 5) {
        five++;
      } else if (n == 7) {
        seven++;
      }
    } {
      int n = sc.nextInt();
      if (n == 5) {
        five++;
      } else if (n == 7) {
        seven++;
      }
    } int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc if (n == 5) {
        five++;
      } else if (n == 7) {
        seven++;
      } n == 5 n 5 {
        five++;
      } five++ five if (n == 7) {
        seven++;
      } n == 7 n 7 {
        seven++;
      } seven++ seven System.out.println(five == 2 && seven == 1 ? "YES" : "NO") System.out.println System.out System System.out five == 2 && seven == 1 ? "YES" : "NO" five == 2 && seven == 1 five == 2 five 2 seven == 1 seven 1 "YES" "NO" String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    int five = 0;
    int seven = 0;
    for (int i = 0; i < 3; i++) {
      int n = sc.nextInt();
      if (n == 5) {
        five++;
      } else if (n == 7) {
        seven++;
      }
    }
    System.out.println(five == 2 && seven == 1 ? "YES" : "NO");
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    int five = 0;
    int seven = 0;
    for (int i = 0; i < 3; i++) {
      int n = sc.nextInt();
      if (n == 5) {
        five++;
      } else if (n == 7) {
        seven++;
      }
    }
    System.out.println(five == 2 && seven == 1 ? "YES" : "NO");
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    
    int five = 0;
    int seven = 0;
    for (int i = 0; i < 3; i++) {
      int n = sc.nextInt();
      if (n == 5) {
        five++;
      } else if (n == 7) {
        seven++;
      }
    }
    System.out.println(five == 2 && seven == 1 ? "YES" : "NO");
  }
}