program Project1;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var a,p:array[1..6,1..2] of integer;
    ok,i1,i2,i3,i,j,s,n,mem:word;

procedure pov(z:integer);
var mem:word;
begin
 mem:=p[z,1];
 p[z,1]:=p[z,2];
 p[z,2]:=mem;
end;

begin
  n:=0;
  assign(input,'box.in');
  reset(input);
   for i:=1 to 6 do
    begin
     read(a[i,1]); read(a[i,2]);
    end;
  close(input);
  n:=0;
  ok:=0;
  for i:=1 to 6 do
  for j:=1 to 6 do
     if ((i<>j) and (a[j,1]+a[j,2]>0) and
        ( ((a[i,1]=a[j,1]) and  (a[i,2]=a[j,2]))
        or((a[i,1]=a[j,2]) and  (a[i,2]=a[j,1])) ))
     then
      begin
       inc(n);
        p[n,1]:=a[i,1];
        p[n,2]:=a[i,2];
        a[i,1]:=-1;
        a[i,2]:=-1;
        a[j,1]:=-1;
        a[j,2]:=-1;
      end
     else
      begin
       ok:=1;
      end;

  for i1:=1 to 2 do
   begin
    if i1=2 then pov(1);
    for i2:=1 to 2 do
     begin
     if i2=2 then pov(2);
     for i3:=1 to 2 do
      begin
       if i3=2 then pov(3);
       if (p[1,2]=p[2,1]) and (p[2,2]=p[3,1])
        and (p[3,2]=p[1,1]) then begin ok:=1; end;
      end;
     end;
   end;

  assign(output,'box.out');

  rewrite(output);
    if  ok=1 then write('POSSIBLE') else write('IMPOSSIBLE');
  close(output);
end.
