// Arup Guha
// Solution for Programming Team October 4, 2003 Practice Problem Simple

import java.io.*;
import java.util.*;

class lineseg {

  public double[] point; //Stores origin point of the segment
  public double[] direction; // Stores vector of the segment
  public int dimension; // dimension of the segment

  final public static double epsilon = 0.0000000000001;

  // Creates a lineseg object.
  public lineseg(double[] p, double[] d, int dim) {
    int i;
    point = new double[dim];
    direction = new double[dim];
    for (i=0; i<dim; i++) {
      point[i] = p[i];
      direction[i] = d[i];
    }
    dimension = dim;
  }

  // Returns a String representing the object.
  public String toString() {
    return "Point "+point[0]+","+point[1]+" Dir "+direction[0]+","
           +direction[1];
  }

  // Determines in two dimensions whether or not the line defined by
  // other intersects the line defined by the current object.
  // It is assumed that parallel lines don't intersect.
  public boolean lineinter(lineseg other) {

    // Non-vertical lines, just compare slope.
    if (other.direction[0] != 0 && direction[0] != 0)
      return !(slope() == other.slope());

    // At least one line is vertical.
    return !(other.direction[0] == direction[0]);

  }

  // Given the lines defined by the current object and other, this
  // method determines the value of lambda (the parameter) for the
  // current object, at the point of intersection between the lines.
  // It returns 2 (for no good reason), if the lines don't intersect.
  public double lambda(lineseg other) {

    double den = det(direction[0], -other.direction[0],
                     direction[1], -other.direction[1]);

    double num = det(other.point[0]-point[0], -other.direction[0],
                     other.point[1]-point[1], -other.direction[1]);
    if (den != 0)
      return num/den;
    else
      return 2;
  }

  // Returns true if and only if the two segments intersect at some
  // point other than their endpoints.
  public static boolean seginter(lineseg one, lineseg two) {

    if (one.lineinter(two)) {

      double lambda1 = one.lambda(two);
      double lambda2 = two.lambda(one);

      //System.out.println("l1 = "+lambda1+" l2 = "+lambda2);

      return (0+epsilon<lambda1 && lambda1<1-epsilon && 
              0+epsilon<lambda2 && lambda2<1-epsilon);
    }

    //System.out.println("No intersection.");

    // No line intersection.
    return false;
  }

  // Used only for 2-D line intersection
  public static double det(double a, double b, double c, double d) {
    return a*d-b*c;
  }

  // Used only for 2-D line
  public double slope() {
    return direction[1]/direction[0];
  }

}

public class simple {

  public static void main(String[] args) throws IOException {

    //mkoutput();    

    BufferedReader fin = new BufferedReader(new FileReader("simple.in"));

    StringTokenizer tok = new StringTokenizer(fin.readLine());
    int x = Integer.parseInt(tok.nextToken());
    int y = Integer.parseInt(tok.nextToken());

    int ptcnt = 0;
    lineseg[] sides = new lineseg[100];
    double[][] points = new double[101][2];
    
    while (x!=0 || y!=0) {

      // Read in next point and update set of points and sides.
      points[ptcnt][0] = x; 
      points[ptcnt][1] = y;
      if (ptcnt > 0) {
        double[] point = new double[2];
        double[] dir = new double[2];
        for (int i=0; i<2; i++) {
          point[i] = points[ptcnt-1][i];
          dir[i] = points[ptcnt][i]-points[ptcnt-1][i];
        }
        sides[ptcnt-1] = new lineseg(point,dir,2);
      }

      // Done with poly.
      if (ptcnt>1 && finish(points, ptcnt)) {
        output(sides, ptcnt);
        ptcnt = -1; // Hack since ptcnt gets incremented at end of loop.
        sides = new lineseg[100];
        points = new double[102][2];
      }

      // Read in next line.
      tok = new StringTokenizer(fin.readLine());
      x = Integer.parseInt(tok.nextToken());
      y = Integer.parseInt(tok.nextToken());
      ptcnt++;
    } 
  }

  public static boolean finish(double[][] points, int lastpt) {
   
    if (lastpt == 0) 
      return false;

    return (points[0][0] == points[lastpt][0] && 
            points[0][1] == points[lastpt][1]);
  }

  public static void output(lineseg[] sides, int numsides) {
  
    /* Debug Printing

    System.out.println("Here is poly.");
    for (int i=0; i<numsides;i++) {
      System.out.println(sides[i]);
    }
    System.out.println();

    */

    for (int i=0; i<numsides; i++) {
      for (int j=i+1; j<numsides; j++) {
        if (lineseg.seginter(sides[i],sides[j])) {
          System.out.println("COMPLEX");
          return;
        }
      }
    }
    System.out.println("SIMPLE");
  }

  // This method was used to create some of the input data.
  public static void mkoutput() {

    Random r = new Random();
    double[][] point = new double[101][2];
    lineseg[] segs = new lineseg[100];
    int i=0;
    int segcnt = 0;

    // Loop through 100 points.
    while (i<100) {

      // Pick a random point.
      int[] p = new int[2];   
      p[0] = r.nextInt()%101;
      p[1] = r.nextInt()%101;
      
      point[i][0] = p[0];                  
      point[i][1] = p[1];
      
      // If we have a previous point...
      if (i>0) {

        // Create the line segment from the previous point to this one.
        double[] dir = new double[2];
        dir[0] = point[i][0] - point[i-1][0];
        dir[1] = point[i][1] - point[i-1][1];
        lineseg seg = new lineseg(point[i-1],dir,2);
       
        boolean ok = true;

        // check for an intersection with a previous segment.
        for (int num=0; num<segcnt; num++)
          if (lineseg.seginter(seg,segs[num]))
            ok = false;

        // See if this segment is in the same direction as the previous.
        if (segcnt>0 && equaldir(dir, segs[segcnt-1].direction)) 
          ok = false;
        
        // If it is okay, add this segment in to the array.
        if (ok) {
          segs[segcnt] = seg;
          segcnt++;
          i++;
        } 
      }
      else
        i++;      
    }

    // Print the input test case to the screen.
    for (i=0; i<100; i++) 
      System.out.println((int)point[i][0]+" "+(int)point[i][1]);
    System.out.println((int)point[0][0]+" "+(int)point[0][1]);
   
  }

  // Returns true iff the 2D vectors stored in dir1 and dir2 are in the
  // same direction.
  public static boolean equaldir(double[] dir1, double[] dir2) {
    if (dir1[0] == 0 && dir2[0] == 0)
      return true;
    if (dir1[1] == 0 && dir2[1] == 0)
      return true;
    return (Math.abs(dir1[1]/dir1[0] - dir2[1]/dir2[0])<lineseg.epsilon);
  }
}
