program b;

{$APPTYPE CONSOLE}

uses
  SysUtils;

var a: array [1..6,1..2] of integer;
    res : boolean;
    v: array [1..6] of boolean;
    st : array [1..6] of integer;
    k1,k2,k3 : integer;

procedure init;
 var i,w,h : integer;
begin
  assign(input,'box.in');
  reset(input);
  for i := 1 to 6 do begin
    read(w, h);
    a[i,1] := w;
    a[i,2] := w;
    if w > h then a[i, 1] := h
     else a[i, 2] := h;
  end;
  close(input);
end;

procedure solve;
 var c,i,j : integer;
begin
  res := false;
  fillchar(v,sizeof(v),true);
  c := 0;
  for i := 1 to 5 do
   for j := i + 1 to 6 do
    if v[i] and v[j] then
     if (a[i,1] = a[j,1]) and (a[i,2] = a[j,2]) then
     begin
      inc(c);
      v[i] := false;
      v[j] := false;
      st[c] := i;
     end;

  if c <> 3 then exit;

  k1 := st[1];
  k2 := st[2];
  k3 := st[3];

  if (a[k1,2] = a[k2,2]) then
   if (a[k1,1] = a[k3,1]) and (a[k2,1] = a[k3,2]) or
    (a[k1,1] = a[k3,2]) and (a[k2,1] = a[k3,1]) then res := true;

  if not res then
   if (a[k1,2] = a[k2,1]) then
    if (a[k1,1] = a[k3,1]) and (a[k2,2] = a[k3,2]) or
     (a[k1,1] = a[k3,2]) and (a[k2,2] = a[k3,1]) then res := true;

  if not res then
   if (a[k1,2] = a[k3,1]) then
    if (a[k1,1] = a[k2,1]) and (a[k3,2] = a[k2,2]) or
     (a[k1,1] = a[k2,2]) and (a[k3,2] = a[k2,1]) then res := true;

  if not res then
   if (a[k1,2] = a[k3,2]) then
    if (a[k1,1] = a[k2,1]) and (a[k3,1] = a[k2,2]) or
     (a[k1,1] = a[k2,2]) and (a[k3,1] = a[k2,1]) then res := true;
end;

procedure done;
begin
  assign(output,'box.out');
  rewrite(output);
  if (res) then write('POSSIBLE')
   else write('IMPOSSIBLE');
  close(output);
end;

begin
 init;
 solve;
 done;
end.
 