program box;

var
  I, J, i1, j1, count: Integer;
  A: array[1..6,1..4] of Integer;
  K: array[1..6] of set of byte;

begin
  Assign(Input, 'box.in');
  Assign(Output, 'box.out');
  for I := 1 to 6 do
  begin
    Readln(A[I,1], A[I,2]);
    A[I,3]:=A[I,1];
    A[I,4]:=A[I,2];
  end;
  count:=0;
  for i:=1 to 6 do
  begin
    for j:=1 to 4 do
    if a[i,j]>0 then
    begin
      for i1:=1 to 6 do
        if i1<>i then
        for j1:=1 to 4 do
        if (not ((i1=i) and (j1=j))) and (a[i,j]=a[i1,j1]) and (not (a[i1,j1] in k[i])) then
        if a[i,j]>0 then
        begin
          inc(count);
          include(k[i],i1);
          include(k[i1],i);
          a[i,j]:=0; a[i1,j1]:=0;
        end;
    end;
  end;
  if count=12 then Writeln('POSSIBLE') else Writeln('IMPOSSIBLE');
end.
