fork download
  1. import java.util.Scanner;
  2.  
  3. public class Main {
  4. public static void main(String[] args) {
  5. Scanner sc = new Scanner(System.in);
  6. int t = sc.nextInt();
  7. while (t > 0) {
  8. int n = sc.nextInt();
  9. int x = sc.nextInt();
  10. n = n * x;
  11. if (n >= 10000 && n < 99999) {
  12. System.out.println("YES");
  13. } else {
  14. System.out.println("NO");
  15. }
  16. t--;
  17. }
  18. }
  19. }
  20.  
Success #stdin #stdout 0.13s 49760KB
stdin
4
25 785
402 11
100 100
333 333
stdout
YES
NO
YES
NO