#include<cstdio>
#include<cmath>
#include<algorithm>
#define X 210
#define eps 1e-8
using namespace std;
bool g[X][X],vis[X];
struct point{
double x,y;
}p[X];
int n,flag;
void dfs(int u){
vis[u]=1;
if(u==1){
flag=1;
return ;
}
for(int i=0;i<=n&&!flag;i++)
if(g[u][i]&&!vis[i])
dfs(i);
}
double det(point a,point b,point c){
return (c.x-a.x)*(b.y-a.y)-(c.y-a.y)*(b.x-a.x);
}
int sign(double d){
return d<-eps?-1:d>eps;
}
bool on(point a,point b,point c){
return a.x<max(c.x,b.x)+eps&&a.y<max(b.y,c.y)+eps&&
a.x>min(c.x,b.x)-eps&&a.y>min(b.y,c.y)-eps;
}
bool insert(point a,point b,point c,point d){
int d1=sign(det(a,b,c));
int d2=sign(det(a,b,d));
int d3=sign(det(c,d,a));
int d4=sign(det(c,d,b));
if(d1*d2<0&&d3*d4<0)return 1;
if(d1==0&&on(c,a,b)||d2==0&&on(d,a,b)||d3==0&&on(a,c,d)||d4==0&&on(b,c,d))
return 1;
return 0;
}
int main(){
int i,j,k,cs=0;
double dx,dy;
while(scanf("%d",&n),n){
p[0].x=p[0].y=0;
p[1].x=p[1].y=1e2;
for(i=1;i<=n;i++){
scanf("%lf%lf%lf%lf",&p[i*2].x,&p[i*2].y,&p[i*2+1].x,&p[i*2+1].y);
dx=p[i*2].x-p[i*2+1].x;
dy=p[i*2].y-p[i*2+1].y;
p[i*2].x+=dx*eps;p[i*2+1].x-=dx*eps;
p[i*2].y+=dy*eps;p[i*2+1].y-=dy*eps;
}
n=n*2+1;
for(i=0;i<X;i++){
vis[i]=0;
}
for(i=0;i<=n;i++)
for(j=i+1;j<=n;j++){
flag=1;
for(k=1;k<=n/2;k++)
if(i/2!=k&&j/2!=k&&insert(p[i],p[j],p[k*2],p[k*2+1])){
flag=0;break;
}
g[i][j]=g[j][i]=flag;
}
flag=0;
dfs(0);
puts(flag?"no":"yes");
}
return 0;
}