program gen08;

{$APPTYPE CONSOLE}

uses
  SysUtils,math;

const
    maxn = 100000;
//
//  забиваем n div 2 b
//
//
var
  p,n,k,i,t,l:integer;
  a,b,c: array [1..maxn] of integer;
begin
  randseed := strtoint(paramstr(1));
  n := strtoint(paramstr(2));
  k := strtoint(paramstr(3));
  p := strtoint(paramstr(4));
  writeln(2*(n div 2),' ',k,' ',p);
  for i:=1 to n div 2 do
  begin
    t := random(k-1)+1;
    l := random(99)+1;
    writeln('+ ',t,' ',l);
    a[i]:=t;
    b[i]:=l;
  end;
  for i:= n div 2 downto 1 do
  begin
    writeln('- ',a[i],' ',b[i]);
  end;
end.
