https://www.acmicpc.net/problem/15973
px1,py1,px2,py2=map(int,input().split())
qx1,qy1,qx2,qy2=map(int,input().split())
def check(v1,v2,v3,v4):
if v2<v3 or v4<v1: return 0
elif v2==v3 or v4==v1: return 1
return 2
x=check(px1,px2,qx1,qx2)
y=check(py1,py2,qy1,qy2)
if x==0 or y==0: print("NULL")
elif x==1: print("POINT" if y==1 else "LINE")
else: print("LINE" if y==1 else "FACE")