program boxo;

{$APPTYPE CONSOLE}

uses
  SysUtils;
type
 ara=0..10000;
var
 fin,fout:textfile;
 w,h:array[1..6] of ara;
 i,j,s,s1,s2:ara;
 wc:array[1..6] of boolean;
begin
  { TODO -oUser -cConsole Main : Insert code here }
  assignfile(fin,'box.in');
  assignfile(fout,'box.out');
  reset(fin);rewrite(fout);
  for i:=1 to 6 do
   readln(fin,w[i],h[i]);
  closefile(fin);
  for i:=1 to 6 do
   begin
    wc[i]:=false;s1:=0;s2:=0;
    for j:=1 to 6 do
     begin
      if w[i]=w[j] then s1:=s1+1;
      if w[i]=h[j] then s1:=s1+1;
      if h[i]=h[j] then s2:=s2+1;
      if h[i]=w[j] then s2:=s2+1;
     end;
    if ((s1=4)or(s1=8)or(s1=12))and((s2=4)or(s2=8)or(s2=12))
     then wc[i]:=true;
   end;
  s:=0;
  for i:=1 to 6 do
   if wc[i]=true then s:=s+1;
  if s=6 then writeln(fout,'POSSIBLE') else
   writeln(fout,'IMPOSSIBLE');
  closefile(fout);
end.
