import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) { /* Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution. */ Scanner sc=new Scanner(System.in); int q=sc.nextInt(); boolean f=false;int t;int xt=0,yt=0;int []x;int []y; for(int i=0;i=0 && xt>0) f=true; else if(y[j]==yt && x[j]<=xt && x[j]>=0 && yt>0) f=true; else if(x[j]==xt && y[j]>=yt && y[j]<=0 && xt<0) f=true; else if(y[j]==yt && x[j]>=xt && x[j]<=0 && yt<0) f=true; else{ f=false;break; } } if(f) System.out.println("YES"); else System.out.println("NO"); } } }