program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
    i, j: Integer;

    a: array[1..6] of record
                        w, h, index: Integer;
                      end;
    fin: Boolean;
    
    b, c: array[1..12] of Integer;


{*******************************************************}

begin
  AssignFile(Input, 'box.in');
  Reset(Input);
  AssignFile(Output, 'box.out');
  Rewrite(Output);

{*******************************************************}
  FillChar(a, sizeof(a), 0);

  j := 0;

  for i := 1 to 6 do
  begin
    Readln(a[i].w, a[i].h);
    a[i].index := 1;

    j := j + 1;
    b[j] := a[i].w;
    j := j + 1;
    b[j] := a[i].h;
  end;


  for i := 1 to 5 do
    for j := i+1 to 6 do
        if ((a[j].w = a[i].w) and (a[j].h = a[i].h)) or
           ((a[j].w = a[i].h) and (a[j].h = a[i].w)) then
        begin
          Inc(a[j].index);
          Inc(a[i].index);
        end;

  fin := True;

  for i := 1 to 6 do
    if odd(a[i].index) then
    begin
      fin := False;
      Break;
    end;

  for i := 1 to 12 do c[i] := 1;

  for i := 1 to 11 do
    for j := i+1 to 12 do
      if b[i] = b[j] then
      begin
        inc(c[i]);
        inc(c[j]);
      end;

  for i := 1 to 12 do
    if c[i] mod 4 <> 0 then
    begin
      fin := False;
      Break;
    end;

{*******************************************************}
  if fin then Writeln('POSSIBLE')
         else Writeln('IMPOSSIBLE');

  CloseFile(Input);
  CloseFile(Output);
end.


