program b123;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var
  i,j,k,m:longint;
  a:array [1..6,1..2] of longint;
  b: array [1..6] of longint;
  tmp:array [1..12] of longint;
  a1,b1:longint;
begin
  { TODO -oUser -cConsole Main : Insert code here }
  assign(input,'box.in');reset(input);
  assign(output,'box.out');rewrite(output);
  k:=0;
  for i:=1 to 6 do
  begin
     read(a1,b1);
     if a1<b1 then begin m:=b1;b1:=a1;a1:=m;end;
     m:=0;
     tmp[i*2-1] :=a1;
     tmp[i*2]:=b1;
     for j:=1 to k do if (a[j,1]=a1 ) and (a[j,2]=b1) then m:=j;
     if  m=0 then
     begin
       inc(k);
       a[k,1]:=a1;
       a[k,2]:=b1;
       b[k]:=1;
     end else inc(b[m]);
  end;
  m:=0;
  for i:=1 to k do m:=m +(b[i] mod 2);
  for i:=1 to 12 do
    for j:= i+1 to 12 do
      if b[i]>b[j] then
      begin
        k:=b[i];b[i]:=b[j];b[j]:=k;
      end;
  for i:=1 to 4 do inc(m,tmp[i]-tmp[1]);
  for i:=5 to 8 do inc(m,tmp[i]-tmp[5]);
  for i:=9 to 12 do inc(m,tmp[i]-tmp[12]);
  if m=0 then write('POSSIBLE') else write('IMPOSSIBLE');
  close(input);
  close(output);
end.
