var
  a: array [1..6, 1..2] of longint;
  j, i, t, q, w, e: longint;
  bool: boolean;

begin
  assign(input, 'box.in');
  assign(output, 'box.out');
  reset(input);
  rewrite(output);
  q := 0;
  w := 0;
  e := 0;

  for i := 1 to 6 do
  begin
    readln(a[i][1], a[i][2]);
    if a[i][1] > a[i][2] then
    begin
      t := a[i][1];
      a[i][1] := a[i][2];
      a[i][2] := t;
    end;
  end;
  q := 1;
  bool := false;
  for i := 2 to 5 do
  begin
    if (a[i][1] <> a[q][1]) or (a[i][2] <> a[q][2]) then
    begin
      w := i;
      bool := true;
      break;
    end;
   if bool then
     break;
   end;
  bool := false;
  for i := 2 to 5 do
    if ((a[i][1] <> a[q][1]) or (a[i][2] <> a[q][2])) and ((a[i][1] <> a[w][1]) or (a[i][2] <> a[w][2])) then
    begin
      e := i;
      break;
    end;
  bool := false;
  for i := 2 to 5 do
  begin
    if ((a[i][1] <> a[q][1]) or (a[i][2] <> a[q][2])) and ((a[i][1] <> a[w][1]) or (a[i][2] <> a[w][2])) and ((a[i][1] <> a[e][1]) or (a[i][2] <> a[e][2])) then
      bool := true;
    if bool then
      break;
  end;
  if bool then
    write('IMPOSSIBLE')
  else
  begin
    if (w <> 0) and (e <> 0) then
    begin
      if a[q][1] = a[w][1] then
      begin
        if a[q][2] > a[w][2] then
        begin
          if (a[q][2] = a[e][2]) and (a[w][2] = a[e][1]) then
            write('POSSIBLE')
          else
            write('IMPOSSIBLE');
        end
        else
        begin
          if (a[q][2] = a[e][1]) and (a[w][2] = a[e][2]) then
            write('POSSIBLE')
          else
            write('IMPOSSIBLE');
        end;
      end
      else
      begin
        if a[q][2] = a[w][2] then
        begin
          if a[q][1] > a[w][1] then
          begin
            if (a[q][1] = a[e][2]) and (a[w][1] = a[e][1]) then
              write('POSSIBLE')
            else
              write('IMPOSSIBLE');
          end
          else
          begin
            if (a[q][1] = a[e][1]) and (a[w][1] = a[e][2]) then
              write('POSSIBLE')
            else
              write('IMPOSSIBLE');
          end;
        end
        else
          write('IMPOSSIBLE');
      end;
    end
  else
    if (w <> 0) and (e = 0) then
    begin
      if a[q][1] = a[q][2] then
      begin
        if (a[q][1] = a[w][1]) or (a[q][1] = a[w][2]) then
          write('POSSIBLE')
        else
          write('IMPOSSIBLE')
      end
      else
      begin
        if a[w][1] = a[w][2] then
        begin
          if (a[w][1] = a[q][1]) or (a[w][1] = a[q][2]) then
            write('POSSIBLE')
          else
            write('IMPOSSIBLE');
        end
        else
          write('IMPOSSIBLE');
      end;
    end
    else
      if (w = 0) and (e = 0) then
      begin
        if a[1][1] = a[1][2] then
          write('POSSIBLE')
        else
          write('IMPOSSIBLE')        
      end;
  end;
  close(input);
  close(output);
end.
