program Project2;

{$APPTYPE CONSOLE}

uses
  SysUtils;

type
  arr=array [1..2] of integer;
var
  s:array [1..6] of arr;
  f:text;
  i,q,same,sum:integer;
procedure extw;
var
  ip,jp:integer;
begin
  for ip:=1 to 5 do
    for jp:=ip+1 to 6 do
      if ((s[ip,1]=s[jp,1])) and (s[ip,2]=s[jp,2]) then
      begin
        s[jp,1]:=0;
        s[jp,2]:=0;
        break;
      end
end;
procedure sort;
var ip,c:integer;
begin
  for ip:=1 to 6 do
  begin
    if s[ip,1]>s[ip,2] then
    begin
      c:=s[ip,1];
      s[ip,1]:=s[ip,2];
      s[ip,2]:=c;
    end;
  end;
end;
function compact1:integer;
var
  ip,jp,pp:integer;
  a:array [1..12] of integer;
begin
  extw;
  pp:=0;
  for ip:=1 to 12 do a[ip]:=0;
  for ip:=1 to 6 do
  begin
    if s[ip,1]>0 then
    begin
      inc(pp);
      a[pp]:=s[ip,1];
      inc(pp);
      a[pp]:=s[ip,2];
    end;
  end;
  for ip:=1 to 11 do
    for jp:=ip+1 to 12 do
    begin
      if a[ip]=a[jp] then a[jp]:=0;
      break;
    end;
  jp:=0;
  for ip:=1 to 12 do
    if a[ip]>0 then inc(jp);
  compact1:=jp;
end;
begin
  assign(f,'box.in');
  reset(f);
  for i:=1 to 6 do
  begin
    readln(f, s[i,1],s[i,2]);
    same:=s[i,1];
    if(s[i,1]=s[i,2])and(s[i,1]=same) then inc(sum);
  end;
  if sum=6 then
  begin
       assign(f,'box.out');
       rewrite(f);
       writeln(f,'POSSIBLE');
       CLOSE(F);halt;
  end;
  close(f);
  sort;
  assign(f,'box.out');
  rewrite(f);
  q:=compact1;
  if q=6 then
    writeln(f,'POSSIBLE')
    else writeln(f,'IMPOSSIBLE');
  close(f);
end.
