import sys input = sys.stdin.readline from collections import * MOD = 998244353 N = int(input()) M = int(input()) if N