{$APPTYPE CONSOLE}
var
  i,j,n,a,b,count:longint;
  x,y,z,c:array[1..6]of longint;

procedure out(x:longint);
begin
  if x=0 then write('IMPOSSIBLE') else write('POSSIBLE');
  halt;
end;

procedure swap(var a,b:longint);
var buf:longint;
begin
  buf:=a; a:=b; b:=buf;
end;

begin
  assign(input,'box.in'); reset(input);
  assign(output,'box.out'); rewrite(output);
  for i:=1 to 6 do begin
    read(a,b);
    if a>b then swap(a,b);
    j:=1; while j<=n do if (x[j]=a)and(y[j]=b) then break else inc(j);
    if j<=n then inc(c[j]) else
        if j>n then begin
          inc(n);
          x[j]:=a; y[j]:=b;
        end;
  end;
  for i:=1 to n do c[i]:=(c[i]+1)div 2;
  for i:=1 to n do count:=count+c[i];
  if count<>3 then out(0);
  if c[1]=2 then begin
    x[3]:=x[1]; y[3]:=y[1];
  end else if c[2]=2 then begin
    x[3]:=x[2]; y[3]:=y[2];
  end else if c[1]=3 then begin
    x[2]:=x[1]; y[2]:=y[1];
    x[3]:=x[1]; y[3]:=y[1];
  end;
  z[1]:=x[1]; z[2]:=y[1];
  z[3]:=x[2]; z[4]:=y[2];
  z[5]:=x[3]; z[6]:=y[3];
  if z[1]<>z[4] then swap(z[3],z[4]);
  if z[1]<>z[4] then swap(z[1],z[2]);
  if z[1]<>z[4] then swap(z[3],z[4]);
  if z[3]<>z[6] then swap(z[5],z[6]);
  if (z[1]=z[4])and(z[3]=z[6])and(z[2]=z[5]) then out(1) else out(0);
end.
