require 'prime' n = gets.to_i v = 1 h = Hash.new(0) g = Prime::EratosthenesGenerator.new (1...n) .each do |e| d = e.prime_division(g) unless d.any?{|q,m| h[q] >= m} d.each{|q,m| h[q] += m} v = (v*e)%998244353 end end p v