PROGRAM ASD;
Const InFile='box.in';
        OutFile='box.out';
var a,b,i,j,k,l         : longint;
    A1,B1,c,d               : ARRAY[1..100] OF LONGINT;
   OK                           : array [1..100] of BOOLEAN;
   f            : 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;
  fillchar(ok,sizeof(ok),false);
  k:=0;
  for i:=1 to 6 do
   if a1[i]<>-1 then
   begin
     for j:=1 to 6 do
      if i<>j then
      begin
       if (a1[i]=a1[j])and(b1[i]=b1[j]) then
        begin
         ok[i]:=true;
         ok[j]:=true;
         inc(k);
         c[k]:=a1[i];
         d[k]:=b1[i];
         a1[j]:=-1;
         b1[j]:=-1;
         a1[i]:=-1;
         b1[i]:=-1;
         break;
        end;
      end;
   end;
  f:=true;
  for i:=1 to 6 do
   if ok[i]=false then
    begin
     f:=false;
     break;
    end;
 if f then
  begin
   f:=false;
   if (c[1]=c[2]) then
    begin
     if ((d[1]=c[3])and(d[2]=d[3]))or ((d[1]=d[3])and(d[2]=c[3])) then
      f:=true;
    end;
   if c[1]=d[2] then
    begin
     if ((d[1]=c[3])and(c[2]=d[3]))or ((d[1]=d[3])and(c[2]=c[3])) then
      f:=true;
    end;
   if (c[1]=c[3]) then
    begin
     if ((d[1]=c[2])and(d[2]=d[3]))or ((d[1]=d[2])and(d[3]=c[2])) then
      f:=true;
    end;
   if c[1]=d[3] then
    begin
     if ((d[1]=c[2])and(c[3]=d[2]))or ((d[1]=d[2])and(c[2]=c[3])) then
      f:=true;
    end;
  end;
   Assign(output,outfile);
 Rewrite(output);
  if f then write('POSSIBLE') ELSE WRITE('IMPOSSIBLE');
 Close(output);
 Close(input);
END.