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

public class convex_al {
  static final int MaxN = 1000, MaxC = (int)1e4;

  static void error (String s) throws Exception {
    throw new RuntimeException (s);
  };

  static Scanner in; 

  static int rangeInt (int a, int b) throws Exception {
    int x = in.nextInt ();
    if (x < a && x > b) error ("Integer " + x + " is not in range " + a + ".." + b);
    return x;
  };

  static int sqr (int x) {
    return x * x;
  };

  static int n;
  static Point [] p;

  static public Point llongest (int dx, int dy) {
    int mn = 0, vl = dy * p[0].x - dx * p[0].y, vd = dx * p[0].x + dy * p[0].y;
    for (int i = 1; i < n; i++) {
      int lc = dy * p[i].x - dx * p[i].y, dc = dx * p[i].x + dy * p[i].y;
      //System.out.println (i + " " + lc + " " + dc + " " + dx + " " + dy + " " + p[i].x + " " + p[i].y);
      if (lc < vl || (lc == vl && dc > vd)) {
        vl = lc; vd = dc; mn = i;
      };
    };
    return p[mn];
  };

  public static void main (String args []) throws Exception {
    in = new Scanner (new File ("convex.in"));
    PrintWriter out = new PrintWriter ("convex.out");
    n = rangeInt (1, MaxN);
    p = new Point [n];
    Point [] d = new Point [2 * n];
    for (int i = 0; i < n; i++) {
      p[i] = new Point (rangeInt (-MaxC, MaxC), rangeInt (-MaxC, MaxC));
      d[i + i] = new Point (rangeInt (-MaxC, MaxC) - p[i].x, rangeInt (-MaxC, MaxC) - p[i].y);
      d[i + i + 1] = new Point (rangeInt (-MaxC, MaxC) - p[i].x, rangeInt (-MaxC, MaxC) - p[i].y);
      if (d[i + i].x * d[i + i + 1].y - d[i + i + 1].x * d[i + i].y == 0)
        error ("Collinear sides of angle");
    };

    if (in.hasNext ()) error ("End-of-file expected");

    int ln = -1, rn = -1;
    for (int i = 0; i < n + n; i++) {
      boolean gleft = true, gright = true;
      for (int j = 0; j < n + n; j++) {
        int v = d[i].x * d[j].y - d[j].x * d[i].y;
        if (v > 0) gleft = false;
        if (v < 0) gright = false;
      };
      if (gleft) ln = i;
      if (gright) rn = i;
    };
    if (ln < 0) {
      if (rn >= 0) error ("bug detected");
      out.println (0);
      out.close ();
      return;
    };
    if (rn < 0) error ("bug detected");
    //System.out.println (d[ln].x + " " + d[ln].y + " " + d[rn].x + " " + d[rn].y);

    if (d[ln].x * d[rn].y - d[rn].x * d[ln].y == 0) {
      out.println (1);
      Point t = llongest (d[ln].x, d[ln].y);
      out.println ("line " + t.x + " " + t.y + " " + (t.x + d[ln].x) + " " + (t.y + d[ln].y));
      out.close ();
      return;
    };
    ArrayList <String> ans = new ArrayList <String> ();


    int cx = -d[rn].x, cy = -d[rn].y;
    Point t = llongest (cx, cy);

    ans.add ("inray " + (t.x + d[rn].x) + " " + (t.y + d[rn].y) + " " + t.x + " " + t.y);


    while (true){
      int mx = d[ln].x, my = d[ln].y, md = Integer.MAX_VALUE, mi = -1;
      for (int i = 0; i < n; i++) {
        int cv = mx * (p[i].y - t.y) - (p[i].x - t.x) * my;
        int cd = sqr (p[i].x - t.x) + sqr (p[i].y - t.y);
        if (cv > 0 || (cv == 0 && cd > md)) {
          mi = i;
          mx = p[i].x - t.x;
          my = p[i].y - t.y;
          md = cd;
        };
      };
      if (mi < 0) break;
      ans.add ("segment " + t.x + " " + t.y + " " + p[mi].x + " " + p[mi].y);
      //System.out.println (ans.get (ans.size () - 1));
      t = p[mi];
    };

    ans.add ("outray " + t.x + " " + t.y + " " + (t.x + d[ln].x) + " " + (t.y + d[ln].y));

    out.println (ans.size ());
    for (String s : ans) out.println (s);
    out.close ();
  };
};
