{$A+,B-,C+,D+,E-,F-,G+,H+,I+,J-,K-,L+,M-,N+,O+,P+,Q-,R-,S-,T-,U-,V+,W-,X+,Y+,Z1}
{$MINSTACKSIZE $00004000}
{$MAXSTACKSIZE $00100000}
{$IMAGEBASE $00400000}
{$APPTYPE GUI}
program progb;

{$APPTYPE CONSOLE}



var f: text;
    box: array [1..3] of record x, y: integer; c: integer; end;
    //line: array [1..3] of integer;
    //bo: array[1..3] of boolean;
    a, b, c, t, i, j: integer;
    cool: boolean;
begin
  Assign (f, 'box.in');
  Reset (f);
  for i := 1 to 3 do
  begin
    box[i].c := 0;
    //bo[i] := 0;
  end;
  for i := 1 to 6 do
  begin
    readln(f, a, b);
    if a > b then
    begin
      t := a; a := b; b := t;
    end;
    cool := false;
    for j := 1 to 3 do
      if ((box[j].x = a) and (box[j].y = b) and (box[j].c < 2)) or (box[j].c= 0) then
      begin
        box[j].x := a; box[j].y := b; inc(box[j].c);
        cool := true;
        break;
      end;
  end;
{    if not cool then break;
    cool := false;
    for j := 1 to 3 do
      if (line[j] = a) or (not bo[j]) then
      begin
        line[j] := a; bo[j] := true;
        cool := true;
        break;
      end;
    if not cool then break;
    cool := false;
    for j := 1 to 3 do
      if (line[j] = b) or (not bo[j]) then
      begin
        line[j] := b; bo[j] := true;
        cool := true;
        break;
      end;
   if not cool then break;
  end; }
  Close (f);

  a := box[1].x;
  b := box[1].y;

  if cool then
  begin
    for i := 2 to 3 do
    begin
      cool := true;
      c := 0;
      if (box[i].x = b) then c := box[i].y
      else if (box[i].y = b) then c := box[i].x
      else cool := false;
      if (cool) then
      begin
        j := 5-i;
        cool := ((box[j].x = a) and (box[j].y = c)) or ((box[j].x = c) and (box[j].y = a))
      end;
      if (cool) then break;
    end;
  end;

  {
  if cool then
  begin
    cool := false
    if (box[2].x = a) and
          (((box[2].y = box[3].x) and (b = box[3].y)) or
            (box[2].y = box[3].y) and (b = box[3].x)) then cool := true;
    if (box[2].x = b) and
          (((box[2].y = box[3].x) and (b = box[3].y)) or
            (box[2].y = box[3].y) and (b = box[3].x)) then cool := true;
  end;

   }
    {
  if cool then
  begin
    for i := 1 to 3 do
      if (box[i].c <> 2) then
        cool := false;
  end;
     }
  Assign (f, 'box.out');
  Rewrite (f);
  if cool then
    write(f, 'POSSIBLE')
  else
    write(f, 'IMPOSSIBLE');
  Close (f);
end.
