program task2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
 A,B:array[1..6] of integer ;
 i, W,j:integer;
begin
assign(input,'box.in');reset(input);
assign(output,'box.out');rewrite(output);
for i:=1 to 6 do
 begin
  readln(A[i],B[i]);
  if A[i]>B[i] then
   begin
    W:=A[i];A[i]:=B[i];B[i]:=W;
   end;
 end;
for i:=1 to 5 do
 for j:=i+1 to 6 do
  if (A[i]>A[j])  or ((A[i]=A[j]) and (B[i]>B[j])) then
   begin
     W:=A[i];A[i]:=A[j];A[j]:=W;
     W:=B[i];B[i]:=B[j];B[j]:=W;
   end;
if ((A[1]=A[2]) and (A[3]=A[4])) and (A[2]=A[3]) then
if ((A[5]=A[6]) and (B[1]=B[2])) and (A[6]=B[1]) then
if ((B[3]=B[4]) and (B[4]=B[5])) and (B[5]=B[6]) then
begin
 writeln('POSSIBLE');
 close(output);
 close(input);
 halt;
end;
writeln('IMPOSSIBLE');
close(output);
close(input);
end.
 