program ProbB;

{$APPTYPE CONSOLE}

const maxn = 6;
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 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 w1=w2  then
        if h1=w3 then
          if h2=h3 then f:=true
          else
         else
         if h1=h3 then
            if h2=w3 then f:=true
            else
          else
    else
      if w1 = h2 then
        if h1 = w3 then
          if w2 = h3 then f:=true
          else
         else
         if h1 = h3 then
            if w2 = w3 then f:=true
           else
          else
        else
      if w1 = w3 then
       if h1 = w2 then
         if h2=h3 then f:=true
         else
        else
        if h1=h2 then
          if w2=h3 then f:=true
          else
         else
        else
      if w1=h3 then
        if h1 = w2 then
         if h2=w3 then f:=true
         else
        else
        if h1=h2 then
          if w2=w3 then f:=true;

    if f then writeln('POSSIBLE')
    else writeln('IMPOSSIBLE')

    end;
    close(input);
    close(output);

end.
 