program box;

{$APPTYPE CONSOLE}

uses
  SysUtils;
  label 1,2;
  var
   fopen,fsave:textfile;
   s,k,te,tox:string;
   son,t,tsikl,birs,ikkis,i,j,l,tengmas,tengmas1:integer;
   a:array[1..6,1..2] of integer;
   b:array[1..3] of integer;
begin
  { TODO -oUser -cConsole Main : Insert code here }
  AssignFile(fopen,'box.in');
  AssignFile(fsave,'box.out');
  Reset(fopen);
  Rewrite(fsave);
for tsikl:=1 to 6 do
begin
  Readln(fopen,s);
  l:=length(s);
  i:=0;
  te:='';tox:='';
  repeat
   i:=i+1;
   k:=copy(s,i,1);
   te:=te+k;
  until k=' ';
  delete(te,i,1);
  tox:=copy(s,i+1,l-i);
  birs:=strtoint(te);
  ikkis:=strtoint(tox);
  if (birs<1) or (birs>10000) then goto 1;
  if (ikkis<1) or (ikkis>10000) then goto 1;
  a[tsikl,1]:=birs;
  a[tsikl,2]:=ikkis;
end;
  t:=0;
  tengmas:=0;
  tengmas1:=0;
  for i:=1 to 6 do
  for j:=i+1 to 6 do
   if ((a[i,1]=a[j,1]) or (a[i,1]=a[j,2])) and ((a[i,2]=a[j,1])or (a[i,2]=a[j,2])) then t:=t+1;
  son:=a[1,1];
  for j:=1 to 6 do
  begin
   if a[1,1]=a[j,1] then tengmas:=tengmas+1;
   if a[1,2]=a[j,2] then tengmas1:=tengmas1+1;
  end;

  if ((((tengmas=4) and (tengmas1=6)) or ((tengmas=6) and (tengmas1=4)))) then
  begin
    writeln(fsave,'POSSIBLE');
    goto 2;
  end
  else
  if (t=3) and (tengmas<4) then writeln(fsave,'POSSIBLE')
  else
  writeln(fsave,'IMPOSSIBLE');
  2: CloseFile(fsave);
     closefile(fopen);
1: end.
