using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); static int[][] NArr(long n) => Enumerable.Repeat(0, (int)n).Select(_ => NList).ToArray(); static int[] LList(long n) => Enumerable.Repeat(0, (int)n).Select(_ => int.Parse(ReadLine())).ToArray(); public static void Main() { Solve(); } static void Solve() { var n = NN; var pdiv = GetMinPDivList(n); var counts = new int[n + 1]; for (var i = 2; i <= n; ++i) { var p = PDiv(i, pdiv); foreach (var kv in p) counts[kv.Key] = Math.Max(counts[kv.Key], kv.Value); } var islast = true; var ans = 1L; var mod = 998_244_353; for (var i = n; i > 1; --i) { if (counts[i] > 0) { if (islast) islast = false; else for (var j = 0; j < counts[i]; ++j) ans = ans * i % mod; } } WriteLine(ans); } static int[] GetMinPDivList(int max) { var minPDivList = new int[max + 1]; for (var i = 0; i <= max; ++i) minPDivList[i] = i; for (var i = 2; i * i <= max; ++i) if (minPDivList[i] == i) { for (var j = i * i; j <= max; j += i) if (minPDivList[j] == j) { minPDivList[j] = i; } } return minPDivList; } static Dictionary PDiv(int n, int[] minPDivList) { var p = minPDivList[n]; if (n == p) { var dic = new Dictionary(); dic.Add(p, 1); return dic; } else { var dic = PDiv(n / p, minPDivList); if (dic.ContainsKey(p)) ++dic[p]; else dic.Add(p, 1); return dic; } } }