knyazer

Untitled

Dec 1st, 2020
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. import static java.lang.Math.*;
  4.  
  5. public class Main {
  6.  
  7. public static void main(String[] args) {
  8. Scanner sc = new Scanner(System.in);
  9.  
  10. int n = sc.nextInt(), ans = 0;
  11.  
  12. for (int i = 0; i < n; i++)
  13. {
  14. int r = sc.nextInt();
  15. ans += r % 5 == 0 && r % 7 != 0 ? 1 : 0;
  16. }
  17.  
  18. System.out.println(ans > 0 ? "YES" : "NO");
  19. }
  20. }
Add Comment
Please, Sign In to add comment