Bob is decorating his kitchen, more precisely, the floor. He has found a prime candidate for the tiles he will use. They come in a simple form factor — a square tile that is diagonally split into white and black part as depicted in the figure below. [Image] 

The dimension of this tile is perfect for this kitchen, as he will need exactly $w \times h$ tiles without any scraps. That is, the width of the kitchen is $w$ tiles, and the height is $h$ tiles. As each tile can be rotated in one of four ways, he still needs to decide on how exactly he will tile the floor. There is a single aesthetic criterion that he wants to fulfil: two adjacent tiles must not share a colour on the edge — i.e. one of the tiles must have a white colour on the shared border, and the second one must be black. [Image] The picture on the left shows one valid tiling of a $3 \times 2$ kitchen. The picture on the right shows an invalid arrangement, as the bottom two tiles touch with their white parts. 

Find the number of possible tilings. As this number may be large, output its remainder when divided by $998244353$ (a prime number). 


-----Input-----

The only line contains two space separated integers $w$, $h$ ($1 \leq w,h \leq 1\,000$) — the width and height of the kitchen, measured in tiles.


-----Output-----

Output a single integer $n$ — the remainder of the number of tilings when divided by $998244353$.


-----Examples-----
Input
2 2

Output
16

Input
2 4

Output
64

Difficulty: EASY

Solutions:
import math
a = input().split()
w = int(a[0])
h = int(a[1])
num = pow(2, w + h)
num = num % 998244353
print(num)


(w, h) = map(int, input().split())

def powermod(x, y, mod):
	if y == 0:
		return 1
	return powermod(x * x % mod, y // 2, mod) * (x if y % 2 else 1) % mod
print(powermod(2, w + h, 998244353))


print(2 ** sum(list(map(int, input().split()))) % 998244353)


(a, b) = map(int, input().split())
ans = 2 ** (a + b) % 998244353
print(ans)


mod = 998244353
(W, H) = map(int, input().split())
print(pow(2, H + W, mod))


a = [int(i) for i in input().split()]
w = a[0]
h = a[1]
p = 998244353
dp = [[0 for i in range(h)] for i in range(w)]
dp[0][0] = 4
for i in range(w):
	for j in range(h):
		if i == 0 and j == 0:
			continue
		elif i == 0:
			dp[i][j] = 2 * dp[i][j - 1] % p
		elif j == 0:
			dp[i][j] = 2 * dp[i - 1][j] % p
		else:
			dp[i][j] = (dp[i - 1][j] + dp[i][j - 1]) % p
print(dp[w - 1][h - 1])


import sys

class CTiles:

	def solve(self):
		MOD = 998244353
		(w, h) = [int(_) for _ in input().split()]
		print(pow(2, h + w, MOD))
solver = CTiles()
input = sys.stdin.readline
solver.solve()


(r, c) = map(int, input().split())
table = []
for _ in range(r):
	table.append([1] * c)
for i in range(c):
	table[0][i] = 2
for i in range(r):
	table[i][0] = 2
table[0][0] = 4
res = 1
for i in range(r):
	for j in range(c):
		res *= table[i][j]
print(res % 998244353)


(m, n) = map(int, input().split())
print(pow(2, m + n, 998244353))


(l, b) = map(int, input().split())
print(2 ** (l + b) % 998244353)


data = input().split()
a = int(data[0])
b = int(data[1])
print(2 ** (a + b) % 998244353)


def check_root(n, d):
	return n * n + 2 * n + 1 >= 4 * d

def mod_expo(n, p, m):
	result = 1
	while p != 0:
		if p % 2 == 1:
			result = result * n % m
		p //= 2
		n = n * n % m
	return result
t = 1
while t:
	t = t - 1
	(x, y) = map(int, input().split())
	print(mod_expo(2, x + y, 998244353))


mod = 998244353
(w, h) = map(int, input().split())
print(int(pow(2, h, mod)) * int(pow(2, w, mod)) % mod)


a = input()
a = a.split(' ')
w = int(a[0])
h = int(a[1])
v = 4 * 2 ** (w - 1 + h - 1)
print(v % 998244353)


(w, h) = map(int, input().split())
p = 998244353
k = 1
for i in range(w + h):
	k = 2 * k % p
print(k)


from collections import Counter
import string
import bisect
import math
import sys
mod = 998244353
from fractions import Fraction

def array_int():
	return [int(i) for i in sys.stdin.readline().split()]

def vary(arrber_of_variables):
	if arrber_of_variables == 1:
		return int(sys.stdin.readline())
	if arrber_of_variables >= 2:
		return map(int, sys.stdin.readline().split())

def makedict(var):
	return dict(Counter(var))
testcases = 1
for _ in range(testcases):
	(n, k) = vary(2)
	print(pow(2, n + k, mod))


p = 998244353
a = 2
(n, m) = map(int, input().split())
b = n + m
d = pow(a, b, p)
print(d)


(w, h) = map(int, input().split())
print(2 ** (h - 1) * 4 * 2 ** (w - 1) % 998244353)


(a, b) = list(map(int, input().split()))
print(2 ** (a + b) % 998244353)


m = list(map(int, input().split()))
k = sum(m)
print(pow(2, k, 998244353))


n = list(map(int, input().split()))
print(2 ** (n[0] + n[1]) % 998244353)


(w, h) = list((int(a) for a in input().split()))
print(2 ** (w + h) % 998244353)


(a, b) = input().split()
print(2 ** (int(a) + int(b)) % 998244353)


(n, m) = map(int, input().split())
ans = (n - 1) * (m - 1)
print(2 ** (n * m - ans - 1) * 4 % 998244353)


(n, m) = [int(x) for x in input().split()]
print(pow(2, n + m, 998244353))


(a, b) = [int(x) for x in input().split()]
print(pow(2, a + b, 998244353))


a = input().split(' ')
(b, c) = (int(a[0]), int(a[1]))
print(2 ** (b + c) % 998244353)


mod = 998244353
(w, h) = map(int, input().split())
w += h
w = w % (mod - 1)
print(2 ** w % mod)


def int_list():
	return [int(c) for c in input().split()]

def int1():
	return int(input())

def str_list():
	return [c for c in input().split()]

def str1():
	return input()
(w, h) = int_list()
ex = w + h
res = 1
for i in range(w + h):
	res = res * 2 % 998244353
print(res)


import sys
input = sys.stdin.buffer.readline

def I():
	return list(map(int, input().split()))

def sieve(n):
	a = [1] * n
	for i in range(2, n):
		if a[i]:
			for j in range(i * i, n, i):
				a[j] = 0
	return a
(w, h) = I()
print(pow(2, w + h, 998244353))


import math
q = 1
for _ in range(q):
	c = 998244353
	(w, h) = list(map(int, input().split()))
	ans = 2 ** (w + h) % c
	print(ans % c)


import sys
(a, b) = input().split()
a = int(a)
b = int(b)
res = 2 ** (2 + (a + b - 2)) % 998244353
print(res)


import sys
import math
import collections
inp = lambda : sys.stdin.readline()
m = 998244353
(w, h) = map(int, input().split())
ans = 4
mul = 2
for i in range(1, h):
	ans *= 2
w -= 1
h -= 1
for i in range(w):
	ans *= 2
print(ans % m)


import math
(w, h) = map(int, input().split())
print(pow(2, w + h) % 998244353)


(w, h) = map(int, input().split())
ans1 = pow(2, w - 1, 998244353)
ans2 = pow(2, h - 1, 998244353)
print(ans1 * ans2 * 4 % 998244353)


import sys
input = sys.stdin.readline
sys.setrecursionlimit(100000)

def getN():
	return int(input())

def getList():
	return list(map(int, input().split()))
import math
MOD = 998244353
(w, h) = getList()
print(2 ** (h + w) % MOD)


import math as mt
import sys, string, bisect
input = sys.stdin.readline
from collections import deque, defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
(w, h) = M()
print(pow(2, w + h, 998244353))


s = input()
s = s.split()
a = int(s[0])
b = int(s[1])
print(2 ** (a + b) % 998244353)


a = input()
a = a.split(' ')
i = int(a[0])
j = int(a[1])
print(4 * 2 ** (i - 1) * 2 ** (j - 1) % 998244353)


(a, b) = map(int, input().split())
mod = 998244353
print(2 ** (a + b) % mod)


M = 998244353
(x, y) = [int(i) for i in input().split()]
print(pow(2, x + y, M))


(a, b) = map(int, input().split())
mod = 998244353
val = pow(2, a - 1)
val *= pow(2, b - 1)
val %= mod
val *= 4
print(val % mod)


(w, h) = map(int, input().split())
prime = 998244353
n = 1
for _ in range(w + h):
	n *= 2
	n %= prime
print(n % prime)


(a, b) = list(map(int, input().split()))
mod = 998244353
if a == 1 or b == 1:
	ans = 4 * 2 ** (max(a, b) - 1)
else:
	ans = 4 * 2 ** (a + b - 2)
print(ans % mod)


(w, h) = map(int, input().split())
ways = 4
for _ in range(w + h - 2):
	ways = ways * 2 % 998244353
print(ways)


(*a,) = map(int, input().split())
print(2 ** (a[0] + a[1] - 2) * 4 % 998244353)


import sys
input = sys.stdin.readline
mod = 998244353
(w, h) = list(map(int, input().split()))
print(4 * pow(2, w - 1 + (h - 1), mod) % mod)


import sys
import math
fileoperation = 0
if fileoperation:
	orig_stdout = sys.stdout
	orig_stdin = sys.stdin
	inputfile = open('W:/Competitive Programming/input.txt', 'r')
	outputfile = open('W:/Competitive Programming/output.txt', 'w')
	sys.stdin = inputfile
	sys.stdout = outputfile
mod = 1000000007

def nospace(l):
	ans = ''.join((str(i) for i in l))
	return ans
t = 1
for tt in range(t):
	mmm = 998244353
	(n, m) = map(int, sys.stdin.readline().split(' '))
	val = 4
	val *= pow(2, n - 1, mmm)
	val %= mmm
	val *= pow(2, m - 1, mmm)
	val %= mmm
	print(val)
if fileoperation:
	sys.stdout = orig_stdout
	sys.stdin = orig_stdin
	inputfile.close()
	outputfile.close()


(w, h) = input().split()
w = int(w)
h = int(h)
ans = 1
for i in range(w + h):
	ans = ans * 2 % 998244353
print(ans)


(width, height) = map(int, input().split())
print(2 ** (width + height) % 998244353)


(w, h) = map(int, input().split())
ans = 4
mod = 998244353
ans *= pow(2, w - 1, mod)
ans %= mod
ans *= pow(2, h - 1, mod)
ans %= mod
print(ans)


(w, h) = map(int, input().split())
ans = 4 * 2 ** (w + h - 2)
print(ans % 998244353)


def find_tiles(w, h):
	possible_tiles = 2 ** w * 2 ** h
	return possible_tiles % 998244353
(w, h) = input().strip().split()
print(find_tiles(int(w), int(h)))


(a, b) = [int(i) for i in input().split()]
possible_combinations = 2 ** (a + b)
print(possible_combinations % 998244353)


(x, y) = [int(k) for k in input().split()]
total = 1
for k in range(x):
	total *= 2
	total %= 998244353
for j in range(y):
	total *= 2
	total %= 998244353
print(total)


(w, h) = map(int, input().split())
print(2 ** h % 998244353 * (2 ** w % 998244353) % 998244353)


(x, y) = map(int, input().split())
MOD = 998244353
print(pow(2, x + y - 2, MOD) * 4 % MOD)


def main():
	(w, h) = map(int, input().split())
	print(pow(2, w + h, 998244353))
main()


arr = input().split()
mod = 998244353
ans1 = pow(2, int(arr[1]) + 1, mod)
ans2 = pow(2, int(arr[0]) - 1, mod)
ans = ans1 * ans2 % mod
print(ans)


import os
import heapq
import sys, threading
import math
import bisect
import operator
from collections import defaultdict
sys.setrecursionlimit(10 ** 5)
from io import BytesIO, IOBase

def gcd(a, b):
	if b == 0:
		return a
	else:
		return gcd(b, a % b)

def power(x, p, m):
	res = 1
	while p:
		if p & 1:
			res = res * x % m
		x = x * x % m
		p >>= 1
	return res

def inar():
	return [int(k) for k in input().split()]

def lcm(num1, num2):
	return num1 * num2 // gcd(num1, num2)

def main():
	(n, m) = inar()
	print(power(2, n + m, 998244353))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


(a, b) = map(int, input().split())
print(pow(2, a + b, 998244353))


MOD = 998244353
(w, h) = input().split()
w = int(w)
h = int(h)
p = 2 ** (w + h)
p = p % MOD
print(p)


(nim, mike) = map(int, input().split())
print(2 ** (nim + mike) % 998244353)


def main():
	MOD = 998244353
	(w, h) = map(int, input().split())
	power = w + h
	res = 1
	x = 2
	while power > 0:
		if power % 2 == 1:
			res = res * x % MOD
		x = x * x % MOD
		power //= 2
	print(res)
main()


(w, h) = map(int, input().split())
s = 4 * pow(2, h - 1) * pow(2, w - 1)
print(s % 998244353)


prime = 998244353
(w, h) = list(map(int, input().split()))
print(pow(2, w + h, prime))


def modexp(x, y, p):
	ans = 1
	while y != 0:
		if y & 1:
			ans = ans * x % p
		y >>= 1
		x = x * x % p
	return ans
M = 998244353
(n, m) = map(int, input().split())
print(modexp(2, n + m, M))


def rint():
	return int(input())

def rints():
	return list(map(int, input().split()))
(w, h) = rints()
print(pow(2, w + h, 998244353))


(w, h) = map(int, input().split())
x = 1
x <<= w + h
print(x % 998244353)


(b, c) = map(int, input().split())
f = 1
for i in range(b + c):
	f *= 2
	if f >= 998244353:
		f -= 998244353
print(str(f))


arr = [int(i) for i in filter(None, input().split(' '))]
print(4 * 2 ** (arr[0] - 1) * 2 ** (arr[1] - 1) % 998244353)


(w, h) = map(int, input().split())
tot = 1
for i in range(w + h):
	tot = 2 * tot % 998244353
print(tot)


(w, h) = map(int, input().split())
pow = 1
mod = 998244353
for i in range(w + h):
	pow = pow * 2 % mod
print(pow)


def main():
	(x, y) = [int(x) for x in input().split(' ')]
	return 2 ** (x + y) % 998244353
print(main())


print(2 ** sum((int(i) for i in input().split())) % 998244353)


(w, h) = input().split()
answer = 2 ** (int(w) + int(h))
print(answer % 998244353)


(a, b) = input().strip().split()
a = int(a)
b = int(b)
ans = 2 ** (a + b)
ans %= 998244353
print(ans)


(b, c) = map(int, input().split())
print(str(pow(2, b + c, 998244353)))


import math
import sys
DEBUG = False

def inp():
	return sys.stdin.readline().rstrip()

def dprint(*value, sep=' ', end='\n'):
	if DEBUG:
		print(*value, sep=sep, end=end)
MOD = 998244353

def solve(W, H):
	ans = 1
	for _ in range(W + H):
		ans *= 2
		ans %= MOD
	return ans

def main():
	(W, H) = [int(e) for e in inp().split()]
	print(solve(W, H))
main()


(x, y) = [int(x) for x in input().split()]
print(2 ** (x + y) % 998244353)


inp = list(map(int, input().split()))
h = inp[0]
w = inp[1]
print(4 * 2 ** (h + w - 2) % 998244353)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
(n, m) = map(int, input().split())
print(2 ** n % 998244353 * 2 ** m % 998244353 % 998244353)


(w, h) = map(int, input().split())
p = 998244353
x = w + h
y = 2 ** x % p
print(y)


(w, h) = map(int, input().split())
ways = 4
for i in range(1, w + h - 1):
	ways *= 2
ways = ways % 998244353
print(ways)


mod = 998244353
line = input().split()
n = int(line[0])
m = int(line[1])
ans = 1
for i in range(n + m):
	ans = ans * 2 % mod
print(ans)


(n, m) = map(int, input().split())
res = 4
for _ in range(n - 1):
	res *= 2
for _ in range(m - 1):
	res *= 2
print(res % 998244353)


import sys
inf = float('inf')
ip = lambda : sys.stdin.readline().rstrip()
split = lambda : ip().split(' ')
ip1 = lambda : map(int, split())
arr = lambda : list(ip1())
arr1 = lambda n: [arr() for _ in range(n)]
mod = 998244353
(n, m) = ip1()
print(2 ** (n + m) % mod)


from sys import stdin, stdout
from collections import Counter
import math

def rsingle_int():
	return int(stdin.readline().rstrip())

def rmult_int():
	return [int(x) for x in stdin.readline().rstrip().split()]

def rmult_str():
	return stdin.readline().rstrip().split()

def r_str():
	return stdin.readline().rstrip()

def rsingle_char():
	return stdin.read(1)

def main():
	(w, h) = rmult_int()
	opts = 2 ** (w + 1) * 2 ** (h - 1)
	print(opts % 998244353)
main()


def powmod(x, k, m):
	res = 1
	s = 1
	while s <= k:
		if k & s:
			res = res * x % m
		x = x * x % m
		s <<= 1
	return res
m = 998244353
(w, h) = map(int, input().split())
print(powmod(2, w + h, m))


(w, h) = (int(i) for i in input().split())
print(2 ** (h + w) % 998244353)


import sys
for line in sys.stdin:
	line = line.strip().split()
	w = int(line[0])
	h = int(line[1])
	ans = 2 ** (w + h)
	p = 998244353
	ans = ans % p
	print(ans)


from __future__ import division, print_function
from sys import stdin, stdout
import itertools, os, sys, threading
from collections import deque, Counter, OrderedDict, defaultdict
import heapq
from math import ceil, floor, log, sqrt, factorial, pow, pi, gcd

def ii():
	return int(input())

def si():
	return str(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def fii():
	return int(stdin.readline())

def fsi():
	return str(stdin.readline())

def fmi():
	return map(int, stdin.readline().split())

def fli():
	return list(fmi())
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod = 1000000007
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x
graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def dfs(v, c):
	if visited[v]:
		if col[v] != c:
			print('-1')
			exit()
		return
	col[v] = c
	visited[v] = 1
	for i in graph[v]:
		dfs(i, c ^ 1)

def bfs(d, v):
	q = []
	q.append(v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.append(i)
		print(x)

def make_graph(e):
	d = {}
	for i in range(e):
		(x, y) = mi()
		if x not in d.keys():
			d[x] = [y]
		else:
			d[x].append(y)
		if y not in d.keys():
			d[y] = [x]
		else:
			d[y].append(x)
	return d

def gr2(n):
	d = {}
	for i in range(n):
		(x, y) = mi()
		if x not in d.keys():
			d[x] = [y]
		else:
			d[x].append(y)
	return d

def connected_components(graph):
	seen = set()

	def dfs(v):
		vs = set([v])
		component = []
		while vs:
			v = vs.pop()
			seen.add(v)
			vs |= set(graph[v]) - seen
			component.append(v)
		return component
	ans = []
	for v in graph:
		if v not in seen:
			d = dfs(v)
			ans.append(d)
	return ans

def primeFactors(n):
	s = set()
	while n % 2 == 0:
		s.add(2)
		n = n // 2
	for i in range(3, int(sqrt(n)) + 1, 2):
		while n % i == 0:
			s.add(i)
			n = n // i
	if n > 2:
		s.add(n)
	return s
(n, m) = mi()
x = powerMod(2, n, 998244353)
y = powerMod(2, m, 998244353)
print(x * y % 998244353)


mo = 998244353

def get_pow(a, b):
	if b == 0:
		return 1
	if b == 1:
		return a
	else:
		re1 = get_pow(a, b // 2) % mo
		re2 = get_pow(a, b // 2) % mo
		re3 = get_pow(a, b % 2) % mo
		return re1 * re2 * re3 % mo
(n, k) = map(int, input().split())
ans = get_pow(2, n - 1)
ans = ans * get_pow(2, k - 1)
ans = ans % mo
ans = ans * 4
ans = ans % mo
print(ans)


import sys
a = list(map(int, sys.stdin.readline().split()))
print(2 ** (a[0] + a[1]) % 998244353)


(h, w) = map(int, input().split())
k = 4 * 2 ** (w + h - 2)
print(k % 998244353)


(w, h) = map(int, input().split())
modulo = 998244353
ans = 4
for row in range(h):
	for column in range(w):
		if row == 0 and column == 0:
			pass
		elif row == 0:
			ans *= 2
		else:
			ans *= 2
			break
	ans %= modulo
	ans = 1 if ans == 0 else ans
print(ans)


import sys
from collections import defaultdict, deque
from math import sqrt, gcd

def input():
	return sys.stdin.readline()[:-1]
(a, b) = [int(x) for x in input().split()]
print(4 * 2 ** (a + b - 2) % 998244353)


(x, y) = input().split()
(x, y) = (int(x), int(y))
out = 2 ** (x + y)
out = out % 998244353
print(out)


(x, y) = map(int, input().split())
x += y
mod = 998244353
x = 2 ** x
x %= mod
print(x)


from math import ceil, floor, gcd, fabs, factorial, fmod, sqrt, inf
import math

def sp():
	return map(int, input().split())

def fun(x):
	return sum((int(i) for i in str(x)))
t = 1
for _ in range(t):
	d = 998244353
	(w, h) = sp()
	ans = pow(2, w) * pow(2, h)
	print(ans % d)


def power(x, y, p):
	if y == 0:
		return 1
	temp = power(x, y // 2, p) % p
	if y % 2 == 0:
		return temp * temp % p
	else:
		return x * temp * temp % p
(a, b) = tuple(map(int, input().split()))
p = 998244353
print(power(2, a + b, p))


m = 998244353
(h, w) = map(int, input().split(' '))
if h >= 2 and w >= 2:
	a22 = 16
	out = a22 * (2 ** (w + h - 4) % m)
	out = out % m
else:
	out = 2 * 2 ** (h * w)
	out = out % m
print(out)


(w, h) = input().split()
w = int(w)
h = int(h)
damn = (1 << w + h) % 998244353
print(damn)


import re
s = input()
d = re.findall('\\d+', s)
tiles = 2 ** (int(d[0]) + int(d[1])) % 998244353
print(tiles)


(a, b) = map(int, input().split())
a -= 1
b -= 1
num = 998244353
ans = pow(2, a + b) % num
print(ans * 4 % num)


(w, h) = [int(x) for x in input().split()]
mod = 998244353

def mul(x, y, z):
	return x * y * z % mod
print(mul(2 ** (w - 1), 2 ** (h - 1), 4))


(w, h) = map(int, input().split())
ans = w + h
print(pow(2, ans) % 998244353)


(w, h) = map(int, input().split())
n = pow(2, w + h, 998244353)
print(n)


(a, b) = input().strip().split(' ')
(a, b) = [int(a), int(b)]
print(pow(2, a + b, 998244353))


from math import *
(w, h) = map(int, input().split())
x = 1
while w > 0:
	x = 2 * x % 998244353
	w = w - 1
while h > 0:
	x = 2 * x % 998244353
	h = h - 1
print(int(x))


inputs = input().split(' ')
h = int(inputs[0])
w = int(inputs[1])
ans = 4 * 2 ** (h - 1) * 2 ** (w - 1)
print(ans % 998244353)


import sys
from math import ceil
fast_reader = sys.stdin.readline
fast_writer = sys.stdout.write

def input():
	return fast_reader().strip()

def list_input():
	return list(map(int, input().split()))

def sep_input():
	return map(int, input().split())
mod = 998244353
(h, w) = sep_input()
a = (h + w) % mod
ans = 1
for i in range(a):
	ans = ans * 2 % mod
print(ans)


int_inp = lambda : int(input())
strng = lambda : input().strip()
strl = lambda : list(input().strip())
mul = lambda : map(int, input().split())
mulf = lambda : map(float, input().split())
seq = lambda : list(map(int, input().split()))
import math
from collections import Counter, defaultdict
(a, b) = mul()
print(4 * 2 ** (a + b - 2) % 998244353)


import collections, heapq, itertools, math
groupby = itertools.groupby
rs = lambda : input()
ri = lambda : int(input())
rm = lambda : map(int, input().split())
rai = lambda : [int(x) for x in input().split()]
MOD = 998244353

def solve(a, b):
	return 2 ** (a + b) % MOD

def main():
	(a, b) = rm()
	print(solve(a, b))
main()


import math
from itertools import *
from collections import *
from bisect import *
MOD = 998244353
(w, h) = map(int, input().split())
tot = w + h
ans = 4 * pow(2, tot - 2, MOD)
ans %= MOD
print(ans)


(n, m) = map(int, input().split())
ans = 0
MOD = 998244353
ans += pow(2, n, MOD)
ans *= pow(2, m, MOD)
print(ans % MOD)


from sys import stdin, stdout

def INI():
	return int(stdin.readline())

def INL():
	return [int(_) for _ in stdin.readline().split()]

def INS():
	return stdin.readline()

def OPS(ans):
	stdout.write(str(ans) + '\n')

def OPL(ans):
	[stdout.write(str(_) + ' ') for _ in ans]
	stdout.write('\n')
(w, h) = sorted(INL())
OPS(2 ** (h + w) % 998244353)


import sys, os
from io import BytesIO, IOBase
import collections, itertools, bisect, heapq, math, string
from decimal import *
BUFSIZE = 8192
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def main():
	(w, h) = map(int, input().split())
	mod = 998244353
	ans = 1
	print(2 ** (w + h) % mod)
main()


def main():
	(h, w) = [int(elem) for elem in input().split()]
	print(2 ** (w + h) % 998244353)
main()


(a, b) = map(int, input().split())
c = a + b
print(2 ** c % 998244353)


M = 998244353
(w, h) = map(int, input().split())
print(pow(2, w + h, M))


(n, m) = map(int, input().split())
x = 2 ** (n + m)
x = x % 998244353
print(x)


import math
(x, y) = map(int, input().split())
p = 1
for i in range(0, x + y):
	p = p % 998244353 * (2 % 998244353) % 998244353
print(p)


(w, h) = map(int, input().split())
ans = 2 ** (w + h - 1)
print(ans * 2 % 998244353)


(w, h) = map(int, input().split())
ans = 4
for i in range(w + h - 2):
	ans *= 2
	ans %= 998244353
print(ans)


M = 998244353
(w, h) = map(int, input().split())
a = 4 * pow(2, w - 1, M) * pow(2, h - 1, M)
print(a % M)


inp = list(map(int, input().split()))
(w, h) = (inp[0], inp[1])
if w == 1 and h == 1:
	print(4)
else:
	kq = 1
	for i in range(w + h):
		kq = int(kq * 2 % 998244353)
	print(kq)


l = list(map(int, input().split()))
m = l[0] + l[1]
n = 2 ** m
print(n % 998244353)


(h, w) = [int(ele) for ele in input().split(' ')]
MODULO = 998244353
print(2 ** (h + w) % MODULO)


import math
(x, y) = (int(i) for i in input().split())
mod = 998244353
res = 4 * 2 ** (x - 1) * 2 ** (y - 1)
print(res % mod)


(w, h) = map(int, input().split())
pw = w + h
res = 2 ** pw
res = res % 998244353
print(res)


arr = input().split(' ')
(w, h) = (int(arr[0]), int(arr[1]))
MOD = 998244353
print(pow(2, w + h, MOD))


(w, h) = list(map(int, input().split()))
ways = 4 * 2 ** (w - 1)
print(ways * 2 ** (h - 1) % 998244353)


import sys
input = lambda : sys.stdin.readline().strip()
(n, m) = map(int, input().split())
print(pow(2, n + m, 998244353))


def modExp(a, p):
	m = 998244353
	ans = 1
	while p > 0:
		if p % 2:
			ans = ans * a % m
		p //= 2
		a = a * a % m
	return ans
(a, b) = list(map(int, input().split()))
print(modExp(2, a + b))


(n, k) = map(int, input().split())
print(2 ** (n + k) % 998244353)


import math
for _ in range(1):
	(w, h) = map(int, input().split())
	print(pow(2, w + h, 998244353))


import io, sys, atexit, os
import math as ma
from sys import exit
from decimal import Decimal as dec
from itertools import permutations
from itertools import combinations

def li():
	return list(map(int, input().split()))

def num():
	return map(int, input().split())

def nu():
	return int(input())

def find_gcd(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def lcm(x, y):
	gg = find_gcd(x, y)
	return x * y // gg
mm = 1000000007
mm1 = 998244353
yp = 0

def solve():
	t = 1
	for tt in range(t):
		(n, m) = num()
		print(pow(2, n + m, mm1))
solve()


def binpow(a, p, Mod=998244353):
	if p == 1:
		return a
	if p % 2 == 0:
		x = binpow(a, p / 2)
		return x * x % Mod
	else:
		return binpow(a, p - 1) * a % Mod
(w, h) = [int(i) for i in input().split()]
print(binpow(2, w + h))


X = list(map(int, input().split()))
if X[0] == X[1] == 1:
	print(4)
	exit()
if X[0] == 1:
	print(4 * 2 ** (X[1] - 1) % 998244353)
	exit()
print(4 * 2 ** (X[0] - 2) * 2 ** X[1] % 998244353)


(n, m) = map(int, input().split())
mod = 998244353
(n, m) = (min(n, m) % 998244353, (max(n, m) - min(n, m)) % 998244353)
print(pow(4, n) * pow(2, m) % 998244353)


(W, H) = list(map(int, input().split()))
Arr = [[0] * W] * H
MOD = 998244353
Prod = 4
for i in range(1, H):
	Prod = Prod * 2 % MOD
for i in range(1, W):
	Prod = Prod * 2 % MOD
print(Prod)


import math

def check(n, d):
	return n * n + 2 * n + 1 >= 4 * d

def num(x, y):
	const_prime = 998244353
	s = x + y - 2
	n = 4 * 2 ** s
	n = n % const_prime
	print(n)
(x, y) = map(int, input().split())
num(x, y)


(a, b) = map(int, input().split())
ans = 1
for i in range(a + b):
	ans *= 2
	ans %= 998244353
print(ans)


(h, m) = list(map(int, input().split()))
k = h + m
p = 1
a = 2
while k > 0:
	if k % 2:
		p *= a
		k -= 1
	else:
		a *= a
		k /= 2
print(p % 998244353)


(n, m) = input().split()
n = int(n)
m = int(m)
print(4 * pow(2, n + m - 2, 998244353) % 998244353)


import sys
inf = float('inf')
(mod, MOD) = (1000000007, 998244353)
from bisect import bisect_left, bisect_right

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
mat = [[0 for i in range(1005)] for j in range(1005)]
mat[1][1] = 4
for i in range(2, 1005):
	mat[1][i] = mat[1][i - 1] * 2 % MOD
for i in range(2, 1005):
	mat[i][1] = mat[i - 1][1] * 2 % MOD
for i in range(2, 1005):
	for j in range(2, 1005):
		mat[i][j] = (mat[i - 1][j] + mat[i][j - 1]) % MOD
(r, c) = get_ints()
print(mat[r][c])


(n, m) = map(int, input().split())
print((1 << m) * (1 << n - 1) * 2 % 998244353)


import math
import sys
from collections import Counter

def getdict(n):
	d = {}
	if type(n) is list:
		for i in n:
			if i in d:
				d[i] += 1
			else:
				d[i] = 1
	else:
		for i in range(n):
			t = ii()
			if t in d:
				d[t] += 1
			else:
				d[t] = 1
	return d

def cdiv(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))
(n, k) = mi()
print(4 * 2 ** (k - 1) * 2 ** (n - 1) % 998244353)


(h, w) = [int(x) for x in input().split()]
print(pow(2, h + w, 998244353))


def plitki(w, h):
	mod = 998244353
	result = 1
	while w > 0:
		result = 2 * result % mod
		w -= 1
	while h > 0:
		result = 2 * result % mod
		h -= 1
	return result
(W, H) = [int(i) for i in input().split()]
print(plitki(W, H))


import sys
z = [int(x) for x in sys.stdin.readline().split()]
x = z[0]
y = z[1]
print(4 * pow(2, x - 1) * pow(2, y - 1) % 998244353)


def user99():
	(n, m) = map(int, input().split())
	print(pow(2, n + m, 998244353))
user99()


(n, m) = map(int, input().split())
mod = 998244353
print(2 ** n * 2 ** m % mod)


(a, b) = map(int, input().split())
d = 1
for i in range(0, a + b):
	d *= 2
print(d % 998244353)


def Input():
	tem = input().split()
	ans = []
	for it in tem:
		ans.append(int(it))
	return ans
mod = 998244353
(m, n) = Input()
dp = [[0] * m for i in range(n)]
dp[0][0] = 4
for i in range(1, m):
	dp[0][i] = 2 * dp[0][i - 1]
for i in range(1, n):
	dp[i][0] = 2 * dp[i - 1][0]
	for j in range(1, m):
		dp[i][j] = dp[i - 1][j] + dp[i][j - 1]
print(dp[n - 1][m - 1] % mod)


import math
from collections import deque, defaultdict
from sys import stdin, stdout
input = stdin.readline
listin = lambda : list(map(int, input().split()))
mapin = lambda : map(int, input().split())
(n, m) = mapin()
print(pow(2, m + n, 998244353))


(w, h) = list(map(int, input().split()))
res = 1
mod = 998244353
for _ in range(w + h):
	res = 2 * res % mod
print(res)


(n, m) = [int(i) for i in input().split()]
print(4 * pow(2, n - 1, 998244353) * pow(2, m - 1, 998244353) % 998244353)


(w, h) = map(int, input().split())
d = [[0] * (w + 1) for i in range(h + 1)]
d[1][1] = 4
mod = 998244353
for i in range(2, w + 1):
	d[1][i] = 2 * d[1][i - 1] % mod
for i in range(2, h + 1):
	d[i][1] = 2 * d[i - 1][1] % mod
for i in range(2, h + 1):
	for j in range(2, w + 1):
		d[i][j] = (d[i - 1][j] + d[i][j - 1]) % mod
print(d[h][w])


(h, w) = map(int, input().split())
mod = 998244353
if h > w:
	(h, w) = (w, h)
if h == w == 2:
	print(16)
elif h == w == 1:
	print(4)
elif h == 1:
	ans = 4
	for i in range(w - 1):
		ans *= 2
		ans %= mod
	print(ans)
else:
	ans = 16
	for i in range(h - 2):
		ans *= 2
		ans %= mod
	for i in range(w - 2):
		ans *= 2
		ans %= mod
	print(ans)


(w, h) = map(int, input().split())
m = 998244353
z1 = pow(2, w - 1, m)
z2 = pow(2, h - 1, m)
print(4 * z1 * z2 % m)


p = list(map(int, input().split()))
w = p[0]
h = p[1]
res = 4 * pow(2, w - 1) * pow(2, h - 1)
print(res % 998244353)


def pow1(x, base):
	if base == 0:
		return 1
	sq = pow1(x, base // 2)
	sq = sq * sq % mod
	if base % 2:
		sq *= x
	return sq
(w, h) = map(int, input().split())
mod = 998244353
print(pow1(2, w + h) % mod)


(w, h) = map(int, input().split())
print(pow(2, 2 + (w - 1) + (h - 1), 998244353))


import sys
(w, h) = list(map(int, sys.stdin.readline().strip().split()))
p = 998244353
b = w + h
a = 2
ans = 1
while b > 0:
	if b % 2 == 1:
		b = b - 1
		ans = ans * a % p
	else:
		b = b // 2
		a = a * a % p
print(ans)


(w, h) = map(int, input().split())
a = 2 ** w % 998244353
b = 2 ** h % 998244353
print(a * b % 998244353)


(n, m) = [int(s) for s in input().split()]
print(pow(2, n + m) % 998244353)


(a, b) = map(int, input().split())
print((1 << a + b) % 998244353)


M = 998244353
print(2 * pow(2, sum(map(int, input().split())) - 1, M) % M)


import sys
inf = sys.stdin
lines = inf.readlines()
(w, h) = (int(val) for val in lines[0].split())
print(2 ** (w + h) % 998244353)


valor = input()
listaV = valor.split()
w = int(listaV[0]) - 1
h = int(listaV[1]) - 1
valor = 2 ** w * 2 ** h * 4 % 998244353
print(valor)


MOD = 998244353
(w, h) = [int(x) for x in input().split()]
ans = 4
for _ in range(w + h - 2):
	ans *= 2
	ans %= MOD
print(ans)


ll = lambda : list(map(int, input().split()))
testcases = 1
for testcase in range(testcases):
	[w, h] = ll()
	mod = 998244353
	ans = pow(2, w + h, mod)
	print(ans)


n = sum(list(map(int, input().split())))
ans = pow(2, n) % 998244353
print(ans)


m = 998244353
(x, y) = map(int, input().split())
print(pow(2, x + y, m))


data = input()
data = data.split(' ')
data_min = min(int(data[1]), int(data[0]))
data_max = max(int(data[1]), int(data[0]))
print(pow(4, data_min) * pow(2, data_max - data_min) % 998244353)


(w, h) = map(int, input().split())
a = 2 ** (w - 1) % 998244353
b = 2 ** (h - 1) % 998244353
print(4 * a * b % 998244353)


import math
mi = lambda : map(int, input().split())
print(pow(2, sum(mi()), 998244353))


mod = 998244353
(x, y) = map(int, input().split())
if x == 1 and y == 1:
	print(4)
else:
	print(pow(2, x + y - 2) % mod * 4 % mod)


def solve():
	from sys import stdin
	line = stdin.readline
	(a, b) = map(int, line().split())
	print(pow(2, a + b, 998244353))
solve()


line = input()
tmp = line.split(' ')
(n, m) = (int(tmp[0]), int(tmp[1]))

def p(x):
	ret = 1
	for i in range(x):
		ret = ret * 2 % 998244353
	return ret
print(p(n) * p(m) % 998244353)


from sys import stdin, stdout
import math
(a, b) = list(map(int, stdin.readline().split()))
M = 998244353
print(pow(2, a + b, M))


def c(a, b):
	return 2 ** a * 2 ** b % 998244353
(a, b) = input().strip().split()
print(c(int(a), int(b)))


import sys
input = sys.stdin.readline
(w, h) = map(int, input().split())

def exp_mod(base, exp, mod):
	if exp == 0:
		return 1
	elif exp == 1:
		return base
	elif exp % 2 == 0:
		return exp_mod(base, exp / 2, mod) % mod * (exp_mod(base, exp / 2, mod) % mod) % mod
	else:
		return base * exp_mod(base, exp - 1, mod) % mod
print(exp_mod(2, w + h, 998244353))


(k, m) = map(int, input().split())
print(2 ** (k + m) % 998244353)


(a, b) = list(map(int, input().split()))
print(4 * (2 ** (a - 1) * 2 ** (b - 1)) % 998244353)


(w, h) = map(int, input().split())
c = 998244353
x = 1
while w >= 1:
	x = x * 2 % c
	w -= 1
while h >= 1:
	x = x * 2 % c
	h -= 1
print(x)


mod = 998244353
(w, h) = list(map(int, input().split()))
temp = 4
temp = temp * pow(2, w - 1, mod)
temp = temp * pow(2, h - 1, mod)
print(temp % mod)


(w, h) = map(int, input().split())
mod = 998244353
ans1 = ans2 = 1
for i in range(w):
	ans1 *= 2
	ans1 %= mod
for i in range(h):
	ans2 *= 2
	ans2 %= mod
print(ans1 * ans2 % mod)


from sys import stdin
mod = 998244353
(n, m) = map(int, stdin.readline().strip().split())
ans = 4 * pow(2, n - 1 + m - 1, mod) % mod
print(ans)


from sys import stdin, stdout
(w, h) = map(int, stdin.readline().strip().split())
div = 998244353
ans = 1
for i in range(1, w + 1):
	ans = ans * 2 % div
for i in range(1, h + 1):
	ans = ans * 2 % div
print(ans % div)


(x, y) = map(int, input().split())
print(4 * 2 ** (x - 1) * 2 ** (y - 1) % 998244353)


MOD = 998244353
[w, h] = [int(item) for item in input().split(' ')]
ans = 4
for i in range(w + h - 2):
	ans = ans * 2 % MOD
print(ans)


m = 998244353
(n, k) = map(int, input().split())
a = n + k
ans = [2]
for i in range(2001):
	p = ans[-1] % m * 2 % m
	ans.append(p)
print(ans[a - 1])


(a, b) = map(int, input().split())
n = 998244353
p = a + b
wyn = 1
mno = 2
while p > 0:
	if p % 2 == 1:
		wyn = wyn * mno % n
	mno = mno ** 2 % n
	p //= 2
print(wyn)


ser = input().split()
series = [int(num) for num in ser]
sum1 = sum(series)
print(2 ** sum1 % 998244353)


import sys
import os
from io import BytesIO, IOBase

def ceil(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def prr(a, sep=' '):
	print(sep.join(map(str, a)))

def dd():
	return defaultdict(int)

def ddl():
	return defaultdict(list)

def ddd():
	return defaultdict(defaultdict(int))
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from collections import defaultdict
mod = 998244353
for _ in range(1):
	(w, h) = mi()
	print(4 * pow(2, w - 1, mod) * pow(2, h - 1, mod) % mod)


(w, h) = input().split()
w = int(w)
h = int(h)
s = 2 ** (w + h)
print(s % 998244353)


MOD = 998244353
ans = 4
(w, h) = [int(item) for item in input().split()]
ans *= pow(2, w - 1, MOD)
ans *= pow(2, h - 1, MOD)
print(ans % MOD)


import sys
(a, b) = input().split()
(a, b) = [int(a), int(b)]
print(pow(2, a + b) % 998244353)


r = [int(x) for x in input().split()]
m = pow(2, r[0] + r[1], 998244353)
print(m)


import math
(w, h) = [int(x) for x in input().split(' ')]
t = w + h
ans = 1
for i in range(t):
	ans = ans * 2
	ans = ans % 998244353
print(ans)


import math
(w, h) = map(int, input().rstrip().split())
print(2 ** w % 998244353 * (2 ** h % 998244353) % 998244353)


from bisect import bisect_left as bl
from bisect import bisect_right as br
import heapq
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
input = sys.stdin.readline
M = mod = 998244353

def factors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def inv_mod(n):
	return pow(n, mod - 2, mod)

def li():
	return [int(i) for i in input().rstrip('\n').split()]

def st():
	return input().rstrip('\n')

def val():
	return int(input().rstrip('\n'))

def li2():
	return [i for i in input().rstrip('\n')]

def li3():
	return [int(i) for i in input().rstrip('\n')]
(w, h) = li()
print(2 ** (w + h) % mod)


(are, bre) = map(int, input().split())
nre = 998244353
pre = are + bre
sdskdhs = 1
dfjbdjfbd = 2
while pre > 0:
	if pre % 2 == 1:
		sdskdhs = sdskdhs * dfjbdjfbd % nre
	dfjbdjfbd = dfjbdjfbd ** 2 % nre
	pre //= 2
print(sdskdhs)


(w, h) = map(int, input().split())
ans = 1
for _ in range(w + h):
	ans = ans * 2 % 998244353
print(ans)


from sys import stdin
input = stdin.readline
(w, h) = map(int, input().split())
(h, w) = sorted([w, h])
ans = 1
mod = 998244353
for i in range(w):
	ans += 2 ** i
for i in range(h):
	ans += ans
print(ans % mod)


I = lambda : map(int, input().split())
(x, y) = I()
tt = 2
mod = 998244353
ans = 1
for i in range(x + y):
	ans = ans * 2
	ans = ans % mod
print(ans)


N = 998244353

def expn(bas, exp):
	t = 1
	while exp > 0:
		if exp % 2 != 0:
			t = t * bas % N
		bas = bas * bas % N
		exp = int(exp / 2)
	return t % N
(w, h) = map(int, input().split())
ans = w - 1 + (h - 1)
res = expn(2, ans)
print(res * 4 % N)


def main():
	import sys
	input = sys.stdin.readline
	MOD = 998244353
	(n, m) = map(int, input().split())
	(n, m) = (min(n, m), max(n, m) - min(n, m))
	print(pow(4, n, MOD) * pow(2, m, MOD) % MOD)
	return 0
main()


[w, h] = input().split(' ')
w = int(w)
h = int(h)
resW = 1
for i in range(w - 1):
	resW *= 2
	resW %= 998244353
resH = 1
for i in range(h - 1):
	resH *= 2
	resH %= 998244353
print(resW * resH * 4 % 998244353)


(h, w) = map(int, input().split())
res = h + w
print(pow(2, res, 998244353))


import sys

def main():
	(a, b) = [int(s) for s in sys.stdin.readline().strip().split()]
	print(2 ** (a + b) % 998244353)
main()


edges = sum([int(x) for x in input().split(' ')])
powerOf2 = 1
for i in range(edges):
	powerOf2 *= 2
	powerOf2 %= 998244353
print(powerOf2)


p = input().rstrip().split(' ')
print(2 ** (int(p[0]) + int(p[1])) % 998244353)


z = input().split(' ')
x = int(z[0])
y = int(z[1])
a = 1
for i in range(0, y + x):
	a = a * 2 % 998244353
print(a)


mod = 998244353

def quick_pow(a, b):
	res = 1
	while b > 0:
		if b & 1:
			res = res * a % mod
		a = a * a % mod
		b >>= 1
	return res
(n, m) = input().split()
n = int(n)
m = int(m)
print(quick_pow(2, n + m))


from sys import stdin, stdout
import collections
(W, H) = [int(x) for x in stdin.readline().split()]
A = 1
for i in range(W):
	A *= 2
	A = A % 998244353
B = 1
for i in range(H):
	B *= 2
	B = B % 998244353
res = A * B
res = res % 998244353
print(res)


(a, b) = map(int, input().split())
pro = 4
m = 998244353
x = pow(2, b - 1, m)
y = pow(2, a - 1, m)
print(x * y * pro % m)


import sys

def rl(proc=None):
	if proc is not None:
		return proc(sys.stdin.readline())
	else:
		return sys.stdin.readline().rstrip()

def srl(proc=None):
	if proc is not None:
		return list(map(proc, rl().split()))
	else:
		return rl().split()

def main():
	(w, h) = srl(int)
	print(pow(2, w + h, 998244353))
main()


import sys, math, queue, bisect
MOD = 998244353
sys.setrecursionlimit(1000000)
(w, h) = map(int, input().split())
print(pow(2, w + h, MOD))


def gns():
	return list(map(int, input().split()))
(w, h) = gns()
x = w + h
m = 998244353
li = [2]
for i in range(30):
	li.append(li[-1] * li[-1] % m)
ans = 1
for i in range(30):
	if x >> i & 1 == 1:
		ans *= li[i]
		ans = ans % m
print(ans)


strs = input().split(' ')
w = int(strs[0])
h = int(strs[1])
print(pow(2, w + h, 998244353))


(w, h) = map(int, input().split())
mod = 998244353
ans = 2 ** (w + h)
print(ans % mod)


mod = 998244353

def bigmod(a, p, m):
	res = 1 % m
	x = a % m
	while p > 0:
		if p % 2 == 1:
			res = res * x % m
		x = x * x % m
		p /= 2
	return res
(w, h) = map(int, input().split())
ans = 2 ** (w + h) % mod
print(ans)


(n, m) = [int(p) for p in input().split()]
mod = 998244353
print(2 ** (n + m) % mod)


k = input().split()
a = int(k[0])
b = int(k[1])
print(pow(2, a + b) % 998244353)


(n, m) = map(int, input().split())
mod = 998244353
dp = []
for i in range(n + 1):
	dp.append([0] * (m + 1))
dp[1][1] = 4
for i in range(2, n + 1):
	dp[i][1] = dp[i - 1][1] * 2 % mod
for i in range(2, m + 1):
	dp[1][i] = dp[1][i - 1] * 2 % mod
for i in range(2, n + 1):
	for j in range(2, m + 1):
		dp[i][j] = dp[i - 1][j - 1] * 2 * 2 % mod
print(dp[n][m] % mod)


MOD = 998244353
(r, c) = [int(i) for i in input().split(' ')]
x = 1
while r != 0:
	x = 2 * x % MOD
	r -= 1
while c != 0:
	x = 2 * x % MOD
	c -= 1
print(x)


print(str(pow(2, sum(list(map(int, input().split()))), 998244353)))


import math
(w, h) = map(int, input().split())
ans = int(1)
for i in range(h + w):
	ans = int(ans * 2)
	ans = int(ans % 998244353)
print(ans)


mod = 998244353
(n, m) = [int(i) for i in input().split()]
print(2 ** (n + m) % mod)


fst = list(map(int, input().split()))
print(pow(2, fst[0] + fst[1]) % 998244353)


mod = 998244353

def bigmod(a, p, m):
	if p == 0:
		return 1
	if p % 2:
		return a % m * bigmod(a, p - 1, m)
	else:
		c = bigmod(a, p / 2, m)
		return c % m * (c % m) % m
(w, h) = map(int, input().split())
ans = 4 * bigmod(2, h - 1, mod) * bigmod(2, w - 1, mod) % mod
print(ans)


from sys import stdin
from math import gcd, sqrt
from collections import deque
input = stdin.readline
R = lambda : map(int, input().split())
I = lambda : int(input())
S = lambda : input().rstrip('\n')
hg = lambda x, y: (y + x - 1) // x * x
(n, m) = R()
mod = 998244353
x = 1
while n:
	x = 2 * x % mod
	n -= 1
while m:
	x = 2 * x % mod
	m -= 1
print(x)


import sys
import math
from collections import defaultdict
(w, h) = map(int, input().split())
c = int(pow(2, w + h))
print(c % 998244353)


import sys
input = sys.stdin.readline
write = lambda x: sys.stdout.write(f'{x}\n')
MOD = 998244353
(w, h) = map(int, input().split())
print(4 * pow(2, w - 1, MOD) * pow(2, h - 1, MOD) % MOD)


print(pow(2, sum(map(int, input().split())), 998244353))


(m, n) = map(int, input().split())
ans = 2 ** (m + n)
ans = ans % 998244353
print(ans)


(w, h) = (int(i) for i in input().split())
g = 4
for i in range(1, w):
	g *= 2
	g = g % 998244353
for i in range(1, h):
	g *= 2
	g = g % 998244353
print(g)


(x, y) = [int(k) for k in input().split()]
out = 2 ** (x + y)
out = out % 998244353
print(out)


(m, n) = input().split()
print(2 ** (int(m) + int(n)) % 998244353)


t = list(map(int, input().split(' ')))
print(2 ** (t[0] + t[1]) % 998244353)


(w, h) = map(int, input().split())
l = w + h
res = 1
mod = 998244353
for i in range(l):
	res = res % mod * 2
print(res % mod)


(w, h) = map(int, input().split())
wh = w + h
res = 2 ** wh
res %= 998244353
print(res)


import math
wh = input().split()
w = int(wh[0])
h = int(wh[1])
r = pow(2, w + h, 998244353)
print(r)


(w, h) = map(int, input().split())
mod = 998244353
print(4 * 2 ** (w + h - 2) % mod)


import sys
import re
input = sys.stdin.readline
mod = 998244353
(w, h) = map(int, input().strip().split())
if w == h == 1:
	ans = 4
elif min(w, h) == 1:
	ans = 4 * 2 ** (max(w, h) - 1)
else:
	ans = 4 * 2 ** (w - 1) * 2 ** (h - 1)
print(ans % mod)


(a, b) = map(int, input().split())
MOD = 998244353

def iterative_power(a, b):
	result = 1
	while b > 0:
		result = result * a % MOD
		b -= 1
	return result % MOD
print(iterative_power(2, a + b))


mod = 998244353
(w, h) = list(map(int, input().split()))
ans = 4
for i in range(2, w + 1):
	ans *= 2
	ans %= mod
for i in range(2, h + 1):
	ans *= 2
	ans %= mod
print(ans)


s = input()
w = int(s.split(' ')[0])
h = int(s.split(' ')[1])
print(2 ** (w + h) % 998244353)


a = [int(s) for s in input().split()]
print(2 ** a[0] % 998244353 * (2 ** a[1] % 998244353) % 998244353)


(w, h) = input().split()
print(pow(2, int(w) + int(h)) % 998244353)


(w, h) = map(int, input().split())
if h == 1:
	l = 1
else:
	l = 2 ** (h - 1) % 998244353
if w == 1:
	r = 1
else:
	r = 2 ** (w - 1) % 998244353
print(4 * l * r % 998244353)


n = input().split()
ans = pow(2, int(n[0]) + int(n[1])) % 998244353
print(ans)


(n, m) = list(map(int, input().split()))
m -= 1
n -= 1
Ans = 2 ** (n + m) % 998244353
Ans = 4 * Ans
print(Ans % 998244353)


(a, b) = map(int, input().split())
c = a + b
res = 1
mod = 998244353
for i in range(c):
	res = res % mod * 2
print(res % mod)


(n, m) = map(int, input().rstrip().split(' '))
print(4 * 2 ** (n - 1) * 2 ** (m - 1) % 998244353)


from sys import stdin, stdout, exit
(w, h) = map(int, stdin.readline().split())
mod = 998244353
print(pow(2, w + h, mod))


from collections import defaultdict as dd
from collections import deque
import bisect
import heapq

def ri():
	return int(input())

def rl():
	return list(map(int, input().split()))

def solve():
	(w, h) = rl()
	print(pow(2, w + h, 998244353))
mode = 's'
if mode == 'T':
	t = ri()
	for i in range(t):
		solve()
else:
	solve()


def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res
(m, n) = map(int, input().split())
print(power(2, n + m, 998244353))


from bisect import *
from collections import *
from itertools import *
import functools
import sys
import math
from decimal import *
from copy import *
getcontext().prec = 30
MAX = sys.maxsize
MAXN = 10 ** 5 + 10
MOD = 10 ** 9 + 7

def isprime(n):
	n = abs(int(n))
	if n < 2:
		return False
	if n == 2:
		return True
	if not n & 1:
		return False
	for x in range(3, int(n ** 0.5) + 1, 2):
		if n % x == 0:
			return False
	return True

def mhd(a, b):
	return abs(a[0] - b[0]) + abs(b[1] - a[1])

def charIN(x=' '):
	return sys.stdin.readline().strip().split(x)

def arrIN(x=' '):
	return list(map(int, sys.stdin.readline().strip().split(x)))

def eld(x, y):
	a = y[0] - x[0]
	b = x[1] - y[1]
	return (a * a + b * b) ** 0.5

def lgcd(a):
	g = a[0]
	for i in range(1, len(a)):
		g = math.gcd(g, a[i])
	return g

def ms(a):
	msf = -MAX
	meh = 0
	st = en = be = 0
	for i in range(len(a)):
		meh += a[i]
		if msf < meh:
			msf = meh
			st = be
			en = i
		if meh < 0:
			meh = 0
			be = i + 1
	return (msf, st, en)

def ncr(n, r):
	num = den = 1
	for i in range(r):
		num = num * (n - i) % MOD
		den = den * (i + 1) % MOD
	return num * pow(den, MOD - 2, MOD) % MOD

def flush():
	return sys.stdout.flush()
(w, h) = arrIN()
print(pow(2, w + h, 998244353))


l = list(map(int, input().split()))
print(2 ** (l[0] + l[1]) % 998244353)


(A, B) = map(int, input().split())
print(pow(2, A + B, 998244353))


(a1, b1) = map(int, input().split())
print(2 ** (a1 + b1) % 998244353)


(n, m) = map(int, input().split())
ans = pow(2, n + m - 2, 998244353)
ans = ans * 4
print(ans % 998244353)


(w, h) = map(int, input().split())
if w == 1 and h == 1:
	print(4)
elif w == 1 and h != 1:
	print(2 ** (h + 1) % 998244353)
elif w != 1 and h == 1:
	print(2 ** (w + 1) % 998244353)
else:
	x = 4 * 2 ** (w - 1) * (2 ** (h - 2) * 2)
	print(x % 998244353)


global m
m = 998244353

def pow(x, n):
	res = 1
	while n > 0:
		if n & 1:
			res = res * x % m
		x = x * x % m
		n >>= 1
	return res
(w, h) = map(int, input().split())
print(pow(2, w + h))


(w, h) = [int(s) for s in input().split()]
print(2 ** (w + h) % 998244353)


(w, h) = list(map(int, input().split()))
result = 0
result = pow(2, w + h) % 998244353
print(result)


(n, m) = map(int, input().split())
s = 4 * 2 ** (n - 1) * 2 ** (m - 1)
print(s % 998244353)


import sys
p = 998244353
for line in sys.stdin:
	(h, w) = [int(a) for a in line.split()]
	ans = 2 ** (h + w)
	print(ans % p)
	break


(w, h) = map(int, input().strip().split())
print(pow(2, w + h, 998244353))