n, a, b = 3, 1, 1 M = 2 * 10**5 + 10 facs = [1] * M mod = 998244353 for i in range(1, M): facs[i] = facs[i - 1] * i facs[i] %= mod if a != b: res = facs[n - 1] + (n - 2) * (n - 2) * facs[n - 2] else: res = (n - 1) * (n - 2) * facs[n - 2] res %= mod print(res)