https://www.acmicpc.net/problem/15973
#include<stdio.h>
#include<string.h>
int check(int v1,int v2,int v3, int v4){
if(v2<v3 || v4<v1) return 0;
else if(v2==v3 || v4==v1) return 1;
return 2;
}
int main() {
int px1,py1,px2,py2;
int qx1,qy1,qx2,qy2;
scanf("%d %d %d %d",&px1,&py1,&px2,&py2);
scanf("%d %d %d %d",&qx1,&qy1,&qx2,&qy2);
int x=check(px1,px2,qx1,qx2);
int y=check(py1,py2,qy1,qy2);
if(x==0 || y==0) printf("NULL");
else if(x==1) printf((y==1)?"POINT":"LINE");
else printf((y==1)?"LINE":"FACE");
}