knyazer

Untitled

Dec 1st, 2020
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 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(), s = 0;
  11.  
  12. for (int i = 0; i < n; i++)
  13. {
  14. int r = sc.nextInt();
  15. if (r < 0)
  16. s = 1;
  17. };
  18.  
  19. System.out.println(s == 1 ? "YES" : "NO");
  20. }
  21. }
Add Comment
Please, Sign In to add comment