from functools import reduce def main(): MOD = 998244353 N, A, B = map(int, input().split()) if N == 2: if A == B: print(0) else: print(1) return if A != B: # 先頭がBで末尾がAのパターン patterns_common = reduce(lambda x, y: ((x % MOD) * (y % MOD)) % MOD, range(1, N - 1)) # 先頭がBで末尾がAでないパターン patterns_head_B = (reduce(lambda x, y: ((x % MOD) * (y % MOD)) % MOD, range(1, N - 1)) * (N - 2)) % MOD # 先頭がBでなく末尾がAのパターン patterns_tail_A = patterns_head_B # 先頭がBでなく末尾もAでないパターン patterns_except = ((N - 2) * (N - 3) * reduce(lambda x, y: ((x % MOD) * (y % MOD)) % MOD, range(1, N - 1))) % MOD print((patterns_except + patterns_tail_A + patterns_head_B + patterns_common) % MOD) else: print((N - 1) * (N - 2) * reduce(lambda x, y: ((x % MOD) * (y % MOD)) % MOD, range(1, N - 1)) % MOD) if __name__ == "__main__": main()