#include<cmath>
#include<algorithm>
#include<iostream>
#include<vector>
#include<climits>
#include<set>
#include<cfloat>
#define all(c) (c).begin(),(c).end()
#define curr(P, i) P[(i) % P.size()]
#define next(P, i) P[(i+1) % P.size()]
#define prev(P, i) P[(i+P.size()-1) % P.size()]

using namespace std;

typedef double Real;
typedef pair<int,int> pii;

Real EPS = 1e-8;
const Real PI = acos(-1);

int sgn(Real a, Real b=0){return a<b-EPS?-1:a>b+EPS?1:0;}
Real sqr(Real a){return sqrt(max(a,(Real)0));}

struct Point{  
  Real add(Real a, Real b){
    if(abs(a+b) < EPS*(abs(a)+abs(b)))return 0;
    return a+b;
  }

  Real x, y;
  Point(){}
  Point(Real x,Real y) : x(x) , y(y){}

  Point operator + (Point p){return Point(add(x,p.x), add(y,p.y));}
  Point operator - (Point p){return Point(add(x,-p.x), add(y,-p.y));}
  Point operator * (Real d){return Point(x*d,y*d);}
  Point operator / (Real d){return Point(x/d,y/d);}
  //bool operator == (Point p){return !sgn(dist(p));}
  bool operator == (Point p)const{return abs(x-p.x)<EPS && abs(y-p.y)<EPS;}  
  bool operator < (Point p)const{return (p.x!=x)?x<p.x:y<p.y;}
  Real norm(){return sqr(x*x+y*y);}
  Real dist(Point a){return (*this-a).norm();}
  Real dot(Point a){return x*a.x+y*a.y;}
  Real cross(Point a){return x*a.y-y*a.x;}
  Point rotate(Real r,Point p = Point(0,0)){
    Real ta=cos(r)*(x-p.x)-sin(r)*(y-p.y)+p.x;
    Real tb=sin(r)*(x-p.x)+cos(r)*(y-p.y)+p.y;
    return Point(ta,tb);
  }
  Real arg(){
    if(sgn(x)>0)return atan(y/x);
    if(sgn(x)<0)return atan(y/x)+PI;
    if(sgn(y)>0)return PI/2;
    if(sgn(y)<0)return 3*PI/2;
    return 0;
  }
};

//a -> b -> c
int ccw(Point a, Point b, Point c) {
  b = b-a; c = c-a;
  if (b.cross(c) > EPS)   return +1;     // counter clockwise
  if (b.cross(c) < -EPS)   return -1;    // clockwise
  if (b.dot(c) < -EPS)     return +2;    // c--a--b on line
  if (b.norm() < c.norm()) return -2;    // a--b--c on line
  return 0;                              // a--c--b on line
}

struct Line{
  Point a,b;

  Line(){}
  Line(Point a,Point b):a(a),b(b){}

  bool on(Point c){return abs(ccw(a,b,c))!=1;}
  Real dist(Point c){return abs((b-a).cross(c-a))/(b-a).norm();}
  bool isOrthogonal(Line l){return (a-b).dot(l.a-l.b)==0.0;}
  bool isParallel(Line l){return (a-b).cross(l.a-l.b)==0.0;}
  bool isIntersection(Line l){return !((a-b).cross(l.a-l.b)==0.0);}
  Point intersectionPoint(Line l){
    return a+(b-a)*((l.b-l.a).cross(l.a-a)/(l.b-l.a).cross(b-a));
  }
};

struct Segment: public Line{
  
  Segment(){}
  Segment(Point a,Point b):Line(a,b){}

  bool on(Point c){return ccw(a,b,c)==0;}
  bool on(Line l){return l.on(a)&&l.on(b);}
  bool overlap(Segment s){
    return isParallel(s) && (on(s.a)||on(s.b)||s.on(a)||s.on(b));
  }
  bool isParallel(Segment s){return (a-b).cross(s.a-s.b)==0.0;}

  Real dist(Point c){
    if((b-a).dot(c-a)<EPS)return c.dist(a);
    if((a-b).dot(c-b)<EPS)return c.dist(b);
    return abs((b-a).cross(c-a))/b.dist(a);    
  }

  //Unverified.
  bool isIntersection(Line l){
    return (ccw(l.a,l.b,a)*ccw(l.a,l.b,b)<0);
  }

  bool isIntersection(Segment s){
    return (ccw(a,b,s.a)*ccw(a,b,s.b)<=0 &&
	    ccw(s.a,s.b,a)*ccw(s.a,s.b,b)<=0);
  }

  Point intersectionPoint(Segment s){
    if (a==s.a)return a;
    if (a==s.b)return a;
    if (b==s.a)return b;
    if (b==s.b)return b;
    Point q=s.b-s.a;
    Real d1=abs(q.cross(a-s.a));
    Real d2=abs(q.cross(b-s.a));
    Real t=d1/(d1+d2);
    return a+(b-a)*t;
  }
};

struct Polygon{
  vector<Point>v;
  
  Polygon(){}
  Polygon(int n){v.resize(n);}
  Polygon(vector<Point>v):v(v){} 

  int contain(Point p){
    bool in=false;
    for(int i=0;i<v.size();i++){
      Point a=curr(v,i)-p,b=next(v,i)-p;
      if(a.y>b.y)swap(a,b);
      if(a.y<=0 && 0<b.y && a.cross(b)<0)in=!in;
      if(a.cross(b)==0 && a.dot(b)<=0)return 2;
    }
    return in?1:0;
  }
  
};

vector<vector<int> > segmentArrangement(vector<Segment>S,vector<Point> &P){
  P.clear();

  for(int i=0;i<S.size()-1;i++){
    P.push_back(S[i].a);
    P.push_back(S[i].b);
    for(int j=i+1;j<S.size();j++){
      if(!S[i].isIntersection(S[j]))continue;
      P.push_back(S[i].intersectionPoint(S[j]));
    }
  }
  
  sort(all(P));
  P.erase(unique(all(P)),P.end());

  vector<vector<int> >G(P.size());
  for(int i=0;i<S.size();i++){
    vector<pair<Real,int> >L;

    for(int j=0;j<P.size();j++)
      if(ccw(S[i].a,S[i].b,P[j])==0)
	L.push_back(make_pair((S[i].a-P[j]).norm(),j));
    
    sort(all(L));

    for(int j=0;j+1<L.size();j++){
      int a = L[j].second;
      int b = L[j+1].second;
      G[a].push_back(b);
      G[b].push_back(a);
    }
  }

  for(int i=0;i<G.size();i++){
    for(int j=G[i].size()-2;j>=0;j--){
      for(int k=0;k<=j;k++){
	int e1=G[i][k],e2=G[i][k+1];
	double angle1=atan2(P[e1].y-P[i].y,P[e1].x-P[i].x);
	double angle2=atan2(P[e2].y-P[i].y,P[e2].x-P[i].x);
	if(angle1>angle2)swap(G[i][k],G[i][k+1]);
      }
    }
  }
  return G;
}

bool ans;

void parse(vector<vector<int> >&G,int s,int t,set<pii>&V,vector<Point> &P){
  int v=s,u=t;
  vector<int>p;
  
  while(true){
    if(V.count(make_pair(v,u))){
      reverse(p.begin(),p.end());
      Polygon pol;
      for(int i=0;i<p.size();i++)pol.v.push_back(P[p[i]]);
      if(pol.contain(Point(0,0))==1)ans=true;
      break;
    }
    p.push_back(v);
    V.insert(make_pair(v,u));

    int nx=0;
    for(int i=0;i<G[u].size();i++){
      if(G[u][i]==v){nx=i;break;}
    }
    nx=(nx+1)%G[u].size();
    v=u,u=G[u][nx];
  }
}

int main(void){
  
  int n;
  while(cin >> n,n){
    vector<Segment>Seg(n);
    for(int i=0;i<n;i++){
      cin >> Seg[i].a.x >> Seg[i].a.y;
      cin >> Seg[i].b.x >> Seg[i].b.y;
    }
    vector<Point>P;
    vector<vector<int> >G=segmentArrangement(Seg,P);
    set<pii>V;
    
    ans=false;
    for(int i=0;i<G.size();i++){
      for(int j=0;j<G[i].size();j++){
	int to=G[i][j];
	if(i==to)continue;
	if(V.count(make_pair(i,to))==0)
	  parse(G,i,to,V,P);
      }
    }
    if(ans)cout << "yes" << endl;
    else cout << "no" << endl;
  }
  return 0;
}

Measured memory_bytes: 2468