
{$APPTYPE CONSOLE}

var
  A, B: array[1..6] of Integer;

procedure Swap(var A, B: Integer);
var
  T: Integer;
begin
  T:=A;
  A:=B;
  B:=T;
end;

procedure Inp;
var
  I:Integer;
begin
  for I:=1 to 6 do
    begin
      Read(A[I], B[I]);
      if (A[I] > B[I]) then Swap(A[I], B[I]);
    end;
end;

function Remove: Boolean;
var
  W: Array[1..6] of Byte;
  Found: Boolean;
  I, J:Integer;
begin
  FillChar(W, sizeof(W), 0);
  Remove:=False;

  for I:=1 to 6 do
    if (W[I] = 0) then
      begin
        Found:=False;
        for J:=1 to 6 do
          if (I <> J) and (w[J] = 0) and (A[J] = A[I]) and (B[J] = B[I]) then
            begin
              W[J]:=1;
              Found:=True;
              Break;
            end;
        W[I]:=2;
        if (not Found) then
          Exit;
      end;

  J:=0;
  for I:=1 to 6 do
    if (W[I] = 2) then
      begin
        Inc(J);
        A[J]:=A[I];
        B[J]:=B[I];
      end;

  Remove:=J = 3;
end;

function TestIt(I:Integer; AA, BB: Integer):Boolean;
begin
  testIt:=((A[I] = AA) and (B[I] = BB)) or ((A[I] = BB) and (B[I] = AA));
end;

function Test:Boolean;
var
  Good: Boolean;
begin
  Good:=False;
  if (A[2] = A[1]) then
    Good:=Good or TestIt(3, B[1], B[2]);

  if (B[2] = A[1]) then
    Good:=Good or TestIt(3, B[1], A[2]);

  if (A[3] = A[1]) then
    Good:=Good or TestIt(2, B[1], B[3]);

  if (B[3] = A[1]) then
    Good:=Good or TestIt(2, B[1], A[3]);
  Test:=Good;
end;

procedure Run;
begin
  if (not Remove) then
    WriteLn('IMPOSSIBLE')
  else
    if (Test) then
      WriteLn('POSSIBLE')
    else
      WriteLn('IMPOSSIBLE');
end;

begin
  Assign(Input, 'box.in');
  Reset(Input);
  Assign(Output, 'box.out');
  ReWrite(Output);

  Inp;
  run;

  Close(Input);
  Close(Output);
end.
