

type
  int = longint;
  float = extended;

const
  maxn = 10;
  cin_file = 'box.in';
  cout_file = 'box.out';

type
  trect = array[0..1] of int;

var
  n : int;
  a, b : array[1..maxn] of trect;
  c : array[1..maxn] of int;
  ans : boolean;

procedure swap(var a, b : int);
var
  t : int;
begin
  t := a;
  a := b;
  b := t;
end;

procedure solve;
var
  i, j, k, oi, oj, ok : int;
begin
  n := 6;
  for i := 1 to 6 do
  begin
    read(a[i][0], a[i][1]);
    if (a[i][0] > a[i][1]) then swap(a[i][0], a[i][1]);
  end;

  for i := 1 to n do
    for j := i + 1 to n do
      if (a[j][0] < a[i][0]) or ((a[j][0] = a[i][0]) and (a[j][1] < a[i][1])) then
      begin
        swap(a[i][0], a[j][0]);
        swap(a[i][1], a[j][1]);
      end;

  fillchar(c, sizeof(c), 0);

  j := 1;
  c[1] := 1;
  for i := 2 to 6 do
    if (a[i][0] = a[j][0])  and (a[i][1] = a[j][1]) then
      inc(c[j])
    else
    begin
      inc(j);
      c[j] := 1;
      a[j] := a[i];
    end;
  n := j;
  
  ans := true;
  for i := 1 to n do
    if (odd(c[i])) then ans := false;

  if (ans) then
  begin
    i := 1;
    while (i <= n) do
    begin
      while (c[i] > 2) do
      begin
        inc(n);
        c[n] := 2;
        a[n] := a[i];
        dec(c[i], 2);
      end;
      inc(i);
    end;
    ASSERT(n = 3);
    ans := false;
    for i := 1 to n do
      for oi := 0 to 1 do
        for j := 1 to n do
          if (j <> i) then
            for oj := 0 to 1 do
              for k := 1 to n do
                if (k <> i) and (k <> j) then
                  for ok := 0 to 1 do
                  begin
                    b[1][oi] := a[i][0];
                    b[1][oi xor 1] := a[i][1];
                    b[2][oj] := a[j][0];
                    b[2][oj xor 1] := a[j][1];
                    b[3][ok] := a[k][0];
                    b[3][ok xor 1] := a[k][1];

                    if (b[1][0] = b[2][0]) and (b[1][1] = b[3][0]) and (b[2][1] = b[3][1]) then ans := true;                    
                  end;
  end;

  if (ans) then
    write('POSSIBLE')
  else
    write('IMPOSSIBLE');
end;

begin
  assign(input, cin_file);
  reset(input);
  assign(output,  cout_file);
  rewrite(output);

  solve;

  close(input);
  close(output);
end.