PROGRAM ASD;
Const InFile='box.in';
        OutFile='box.out';
var a,b,i,j         : longint;
    A1,B1               : ARRAY[1..100] OF LONGINT;
   OK                           : BOOLEAN;

BEGIN
 Assign(input,infile);
 Reset(input);
  FOR I:= 1 TO 6 DO
   begin
    READ(A1[I],B1[I]);
    if a1[i]>b1[i] then
     begin
      a:=a1[i];
      a1[i]:=b1[i];
      b1[i]:=a;
     end;
   end;
 ok:=true;
  for i:=1 to 6 do
   if a1[i]<>-1 then
   begin
   if ok then
    begin
     ok:=false;
     for j:=1 to 6 do
      if i<>j then
      begin
       if (a1[i]=a1[j])and(b1[i]=b1[j]) then
        begin
         ok:=true;
         a1[j]:=-1;
         b1[j]:=-1;
         a1[i]:=-1;
         b1[i]:=-1;
         break;
        end;
      end;
    end else break;
   end;
 Assign(output,outfile);
 Rewrite(output);
  if ok then write('POSSIBLE') ELSE WRITE('IMPOSSIBLE');
 Close(output);
 Close(input);
END.