N := 300000;
T := Ceiling(N/3); 
P := [p:p in PrimesInInterval(1,T-1)];
pi := []; for i:=1 to #P do pi[P[i]]:= i; end for;
E := [&+[Floor(N/p^i):i in [1..Floor(Log(p,N))]]:p in P];
L := &cat[[p:i in [1..N div p]]:p in PrimesInInterval(T,N)];
i := #P;
minm := 0;
t:=Cputime();
while true do
    while i gt 0 and E[i] eq 0 do i-:=1; end while;
    if i eq 0 then break; end if;
    m := Max(Ceiling(T/P[i]),minm);
    while m lt T do
        F := Factorization(m);
        X := []; for q in Factorization(m) do X[pi[q[1]]]:=q[2]; end for;
        X[i] := (IsDefined(X,i) select X[i] else 0) + 1;
        if &and[E[j] ge X[j]:j in Keys(X)] then break; end if;
        m +:= 1;
        if E[i] ge X[i] then minm := m; end if;
    end while;
    if m eq T then break; end if;
    for j in Keys(X) do E[j] -:= X[j]; end for;
    Append(~L,m*P[i]);
end while;
print Cputime()-t;
assert &and[n ge T:n in L] and IsDivisibleBy(Factorial(N),&*L);
print N,#L,#L ge N;
