program ProbB;

{$APPTYPE CONSOLE}

const maxn = 6;
function teng(x1,y1,x2,y2,x3,y3:longint):boolean;
begin
   teng := (x1=x3)and(y1=y2)and(x2=y3);
end;
var
    h, w, p : array[1..maxn]of longint;
    u : array[1..maxn]of boolean;
    h1, w1, h2, w2, h3, w3 : longint;
    i,j, k : longint;
    f : boolean;
begin
    assign(input,'box.in');
    reset(input);
    assign(output,'box.out');
    rewrite(output);
    for i:=1 to maxn do begin
    read(w[i], h[i]);
    p[i]:=i;
    end;
    k := 0;
    f := true;
    for i := 1 to maxn do if not u[i] then begin
       inc(k);
       p[k] := i;
       for j := i + 1 to maxn do if not u[i] then
       if (w[i] = w[j])and(h[i] = h[j])or(w[i]=h[j])and(h[i]=w[j])then begin
          u[j]:=true;
          f:=false;
          break;
       end;
      if f then begin
          f:=false;break;
      end else f:=true;
    end;

    if not f or (k <> 3)then writeln('IMPOSSIBLE')
    else begin
      f:=false;
    w1:=w[p[1]];h1:=h[p[1]];
    w2:=w[p[2]];h2:=h[p[2]];
    w3:=w[p[3]];h3:=h[p[3]];
     if teng(w1,h1,w2,h2,w3,h3) or teng(w1,h1,w2,h2,h3,w3)or
        teng(w1,h1,h2,w2,w3,h3)or teng(w1,h1,h2,w2,h3,w3)or
        teng(h1,w1,w2,h2,w3,h3) or teng(h1,w1,w2,h2,h3,w3)or
        teng(h1,w1,h2,w2,w3,h3)or teng(h1,w1,h2,w2,h3,w3) then f:=true;
    if f then writeln('POSSIBLE')
    else writeln('IMPOSSIBLE')
   end;
    close(input);
    close(output);

end.
 