procedure Swap(var A, B: Longint);
var
 C: Longint;
begin
 C:=A;
 A:=B;
 B:=C;
end;

procedure Stop(q: Byte);
begin
 If q = 1
  then WriteLn('POSSIBLE')
  else WriteLn('IMPOSSIBLE');
 Halt(0);
end;

var
 i, j, k, i1, i2, j1, j2, k1, k2: Longint;
 C: array [1..6] of Byte;
 A: array [1..6, 1..2] of LongInt;

begin
 Assign(Input, 'box.in');
 Reset(Input);
 Assign(Output, 'box.out');
 ReWrite(Output);
 i:=0;
 j:=0;
 FillChar(C, SizeOf(C), 0);
 For j:=1 to 6 do
  begin
   inc(i);
   Read(A[i][1], A[i][2]);
   If A[i][1] > A[i][2] then Swap(A[i][1], A[i][2]);
   For k:=1 to i-1 do
    If (A[k][1] = A[i][1]) and (A[k][2] = A[i][2]) and (C[k] = 0) then
     begin
      inc(C[k]);
      dec(i);
      Break;
     end;
  end;
 If i > 3 then Stop(0);
 For i1:=1 to 2 do
  begin
   i2:=2-i1+1;
   For j1:=1 to 2 do
    begin
     j2:=2-j1+1;
     For k1:=1 to 2 do
      begin
       k2:=2-k1+1;
       If (A[1, i2] = A[2, j2]) and (A[1, i1] = A[3, k1]) and (A[2, j1] = A[3, k2]) then Stop(1);
      end;
    end;
  end;
 WriteLn('IMPOSSIBLE');
 Close(Input);
 Close(Output);
end.
