{$APPTYPE CONSOLE}

var i,j,t,k:integer;good1:integer;

  sum:integer;
    masa:array[1..6,1..2] of integer;

    good:integer;

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

  for i:=1 to 6 do
  readln(masa[i,1],masa[i,2]);

  i:=1;
  t:=2;

for k:=1 to 6 do begin
sum:=0;
 for i:=1 to 6 do
 if (masa[k,1]=masa[i,1])and(masa[k,2]=masa[i,2]) then inc(sum);
  if sum<>4 then good1:=-1000;

  end;

  i:=1;
  t:=2;

  repeat
  for j:=t to 6 do
  begin
    if(masa[i,1]=masa[j,1])and(masa[i,2]=masa[j,2]) then
    begin


      masa[i,1]:=-1;
      masa[i,2]:=-1;
      masa[j,1]:=-1;
      masa[j,2]:=-1;
    end;
  end;
  inc(i);
  inc(t);
  until i>=6;


  i:=1;
  t:=2;
  repeat
  for j:=t to 6 do
  begin
    if(masa[i,1]=masa[j,2])and(masa[i,2]=masa[j,1]) then
    begin
      masa[i,1]:=-1;
      masa[i,2]:=-1;
      masa[j,1]:=-1;
      masa[j,2]:=-1;
    end;
  end;
  inc(i);
  inc(t);
  until i>=6;

 //   v dtgwet

for i:=1 to 6 do
if masa[i,1]=-1 then inc(good) else dec(good,1000);
if (good>0)and(good<0) then write('POSSIBLE') else write('IMPOSSIBLE');


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