/*#include <bits/stdc++.h>
using namespace std;
int dab(int x, int y, int cnt)
{
if(x==y)
{
return cnt;
}
if(x>y)
{
return dab(x/2, y, cnt+1);
}
else
{
return dab(x, y/2, cnt+1);
}
}
int main()
{
int a, b;
scanf("%d %d", &a, &b);
printf("%d", dab(a, b, 0));
}*/
/*
#include <bits/stdc++.h>
using namespace std;
int dab(int x, int y)
{
if(x<y)
{
return 0;
}
if(y==0)
return 1;
return dab(x-1, y-1)+dab(x-1, y);
}
int main()
{
int n, k;
scanf("%d %d", &n, &k);
printf("%d", dab(n, k));
}
*/
/*
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
scanf("%d", &n);
int arr[80002]= {};
for(int i=1; i<=n; i++)
{
scanf("%d", &arr[i]);
}
int kkk[80002]= {};
int top=n;
int link;
int puhaha[80002]= {};
long long int ans=0;
kkk[n]=n+1;
while(top>=1)
{
link=top+1;
if(arr[top]>arr[top+1]&&top!=n)
{
// puhaha[top]++;
}
else
{
kkk[top]=top+1;
}
while(link<=n)
{
if(arr[top]>arr[link])
{
puhaha[top]+=puhaha[link]+1;
link=kkk[link];
kkk[top]=link;
}
else
{
kkk[top]=link;
break;
}
}
ans+=puhaha[top];
top--;
}
printf("%lld", ans);
}
*/
/*
#include <bits/stdc++.h>
using namespace std;
int ans=0;
int start=0;
int End=1;
int arr[10000]= {};
int visited[101]={};
vector<int> hahaha[101];
void bfs(int x)
{
// printf("%d\n", x);
visited[x]=1;
ans++;
for(int i=0;i<hahaha[x].size();i++)
{
if (visited[hahaha[x][i]]==0)
{
arr[End++]=hahaha[x][i];
visited[hahaha[x][i]]=1;
}
}
}
int main()
{
arr[0]=1;
visited[1]=1;
int n, m;
scanf("%d %d", &n, &m);
for(int i=1; i<=m; i++)
{
int a, b;
scanf("%d %d", &a, &b);
hahaha[a].push_back(b);
hahaha[b].push_back(a);
}
while(start!=End)
{
bfs(arr[start++]);
}
printf("%d", ans-1);
}*//*
#include <bits/stdc++.h>
using namespace std;
int main()
{
int a1, a2, b1, b2, x1, x2, y1, y2;
scanf("%d %d %d %d %d %d %d %d", &a1, &b1, &a2, &b2, &x1, &y1, &x2, &y2);
if(a2<x1||x2<a1||b1>y2||y1>b2)
{
printf("NULL");
}
else
{
if(a1<=x1&&a2>=x2&&b1<=y1&&b2>=y2){
printf("FACE");
}
else if(x1<=a1&&x2>=a2&&y1<=b1&&y2>=b2){
printf("FACE");
}
else if(a2==x1&&b1!=y2&&b2!=y1)
{
printf("LINE");
}
else if(b1==y2&&a2!=x1&&a1!=x2)
{
printf("LINE");
}
else if(a1==x2&&b1!=y2&&b2!=y1)
{
printf("LINE");
}
else if(b2==y1&&a2!=x1&&a1!=x2)
{
printf("LINE");
}
else if(a2==x1&&b2==y1)
{
printf("POINT");
}
else if(a1==x2&&b2==y1)
{
printf("POINT");
}
else if(a1==x2&&b1==y2)
{
printf("POINT");
}
else if(a2==x1&&b1==y2)
{
printf("POINT");
}
else
{
printf("NULL");
}
}
}*/