Points on a Rectangle

  • + 0 comments

    include

    include

    include

    include

    int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int t; scanf("%d",&t); while(t--) { int n,x[10],y[10],i,minx=10000,maxx=-10000,miny=10000,maxy=-10000; int flag=0; scanf("%d",&n); for(i=0;i=x[i]) minx=x[i]; if(maxx<=x[i]) maxx=x[i]; if(miny>=y[i]) miny=y[i]; if(maxy<=y[i]) maxy=y[i]; } //printf("%d\t%d\t%d\t%d\n",minx,maxx,miny,maxy); for(i=0;i

        }
        if(flag==1)
            printf("NO");
        else
            printf("YES");
        printf("\n");
    }
    return 0;
    

    }