— This is not playing but duty as allies of justice, Nii-chan!

— Not allies but justice itself, Onii-chan!

With hands joined, go everywhere at a speed faster than our thoughts! This time, the Fire Sisters — Karen and Tsukihi — is heading for somewhere they've never reached — water-surrounded islands!

There are three clusters of islands, conveniently coloured red, blue and purple. The clusters consist of a, b and c distinct islands respectively.

Bridges have been built between some (possibly all or none) of the islands. A bridge bidirectionally connects two different islands and has length 1. For any two islands of the same colour, either they shouldn't be reached from each other through bridges, or the shortest distance between them is at least 3, apparently in order to prevent oddities from spreading quickly inside a cluster.

The Fire Sisters are ready for the unknown, but they'd also like to test your courage. And you're here to figure out the number of different ways to build all bridges under the constraints, and give the answer modulo 998 244 353. Two ways are considered different if a pair of islands exist, such that there's a bridge between them in one of them, but not in the other.


-----Input-----

The first and only line of input contains three space-separated integers a, b and c (1 ≤ a, b, c ≤ 5 000) — the number of islands in the red, blue and purple clusters, respectively.


-----Output-----

Output one line containing an integer — the number of different ways to build bridges, modulo 998 244 353.


-----Examples-----
Input
1 1 1

Output
8

Input
1 2 2

Output
63

Input
1 3 5

Output
3264

Input
6 2 9

Output
813023575



-----Note-----

In the first example, there are 3 bridges that can possibly be built, and no setup of bridges violates the restrictions. Thus the answer is 2^3 = 8.

In the second example, the upper two structures in the figure below are instances of valid ones, while the lower two are invalid due to the blue and purple clusters, respectively. [Image]

Difficulty: interview

Starter code:

Solutions:
m = 998244353
n = 5050
mi = [1] * n
for i in range(2, n):
	mi[i] = (-(m//i) * mi[m%i]) % m;
f = [1] * n
g = [1] * n
for i in range(2, n):
	f[i] = (f[i-1] * i) % m
	g[i] = (g[i-1] * mi[i]) % m
	
def calc(x, y):
	s = 1
	p = f[x] * f[y]
	for i in range(1, min(x, y)+1):
		den = g[i] * g[x-i] * g[y-i]
		s += p * den % m
	return s

a, b, c = map(int, input().split())
ans = calc(a, b) * calc(b, c) * calc(c, a) % m
print(ans)

a,b,c = list(map(int, input().split(' ')))


MOD = 998244353

def d(a, b):
	s = 1
	for i in range(a, b+1):
		s*=i
		s%=MOD
	return s




def cnk(n,k):
	s = 1
	for i in range(n-k+1, n+1):
		s*=i
	for i in range(1,k+1):
		s/=i
	return s


def factorial(n):
	s = 1
	for i in range(1, n+1):
		s*=i	
	return s



def pow(a, b):
	c = 1

	while b>0:
		if b%2==0:
			b//=2
			a *=a
			a%=MOD
		else:
			b-=1
			c*=a
			c%=MOD
	return c


def inv(i):
	return pow(i, MOD-2)
"""
def factinv(i):

	return 1.0/factorial(i)

"""
fi = [1, 1]
def sp(n, m):
	s = 1
	d1 = 1
	d2 = 1
	#print(d1,d2,"!")
	for i in range(1, n+1):
		d1*=n-i+1
		d2*=m-i+1

		#print(i, d1,d2)
		d1%=MOD
		d2%=MOD
		s+= d1*d2 *(fi[i]%MOD)
		#print(d1*d2 *(fi[i]%MOD))
		s%= MOD

	return s



s = 1
for i in range(2, max(a,max(b,c))+1):
	s *=i
	s %= MOD
	fi.append(inv(s))


print((sp(a,b)*sp(a,c)*sp(b,c))%MOD)
#print(sp(1,2))
#print(sp(2,2))
#print()


import math
f = 998244353
            
def matchings(a,b):
    m = max(a,b)
    n = min(a,b)
    
    t = 1
    p = 1
    for i in range(0,n):
        p *= (n-i)*(m-i)
        p //= i+1
        t += p
    t = t % f
    return(t)

inputs = [int(x) for x in input().split(" ")]
k = matchings(inputs[0],inputs[1])*matchings(inputs[0],inputs[2])*matchings(inputs[2],inputs[1]) % f
print(k)

import math
f = 998244353
            
def calc(a,b):
    m = max(a,b)
    n = min(a,b)
    
    t = 1
    p = 1
    for i in range(0,n):
        p *= (n-i)*(m-i)
        p //= i+1
        t += p
    t = t % f
    return(t)

a, b, c = map(int, input().split())
ans = calc(a, b) * calc(b, c) * calc(c, a) % f
print(ans)

def gcd(a, b,):
    if b == 0:
        return a, 1, 0
    d, x_, y_  = gcd(b, a % b)
    return d, y_, x_ - (a // b) * y_


def co(a, i):
    return (f[a]*g[i]%998244353*g[a-i])%998244353


a, b, c = map(int, input().split())
r = 0
f = [1]
g = []
for i in range(1, 5005):
    f.append(f[-1]*i%998244353)
g = [(gcd(i, 998244353)[1]) for i in f]
for i in range(min(a, b)+1):
    r+=(co(a, i)*co(b, i)%998244353*f[i])%998244353
h = 0
for i in range(min(a, c)+1):
    h+=(co(a, i)*co(c, i)%998244353*f[i])%998244353
v = 0
for i in range(min(c, b)+1):
    v+=(co(c, i)*co(b, i)%998244353*f[i])%998244353
print((r*h*v)%998244353)

def gcd(a, b,):
    if b == 0:
        return a, 1, 0
    d, x_, y_  = gcd(b, a % b)
    return d, y_, x_ - (a // b) * y_


a, b, c = map(int, input().split())
r = 0
f = [1]
g = []
for i in range(1, 5005):
    f.append(f[-1]*i%998244353)
g = [(gcd(i, 998244353)[1]) for i in f]
for i in range(min(a, b)+1):
    r+=(f[a]*g[i]*g[a-i]*f[b]*g[b-i])%998244353
h = 0
for i in range(min(a, c)+1):
    h+=(f[a]*g[i]*g[a-i]*f[c]*g[c-i])%998244353
v = 0
for i in range(min(c, b)+1):
    v+=(f[c]*g[i]*g[c-i]*f[b]*g[b-i])%998244353
print((r*h*v)%998244353)

def gcd(a, b,):
    if b == 0:
        return a, 1, 0
    d, x_, y_  = gcd(b, a % b)
    return d, y_, x_ - (a // b) * y_


a, b, c = map(int, input().split())
r = 0
f = [1]
g = []
for i in range(1, 5005):
    f.append(f[-1]*i%998244353)
g = [(gcd(i, 998244353)[1]) for i in f]
for i in range(min(a, b)+1):
    r+=(f[a]*g[i]*g[a-i]*f[b]*g[b-i])%998244353
h = 0
for i in range(min(a, c)+1):
    h+=(f[a]*g[i]*g[a-i]*f[c]*g[c-i])%998244353
v = 0
for i in range(min(c, b)+1):
    v+=(f[c]*g[i]*g[c-i]*f[b]*g[b-i])%998244353
print((r*h*v)%998244353)

a, b, c = list(map(int, input().split()))
md = 998244353

def solve(x, y, z):
	res1 = 0
	res2 = 0
	res3 = 0

	a, b, c = sorted([x, y, z])

	tmpA, tmpB, tmpC, tmpK = 1, 1, 1, 1

	for k in range(a + 1):
		d = pow(tmpK, md - 2, md)
		res1 += (tmpA * tmpB * d) % md
		res2 += (tmpA * tmpC * d) % md
		tmpA *= a - k
		tmpA %= md
		tmpB *= b - k
		tmpB %= md
		tmpC *= c - k
		tmpC %= md
		tmpK *= k + 1
		tmpK %= md

		res1 = res1 % md
		res2 = res2 % md

	tmpB, tmpC, tmpK = 1, 1, 1

	for k in range(b + 1):
		d = pow(tmpK, md - 2, md)
		res3 += (tmpB * tmpC * d) % md
		tmpB *= b - k
		tmpB %= md
		tmpC *= c - k
		tmpC %= md
		tmpK *= k + 1
		tmpK %= md

		res3 = res3 % md

	return (res1 * res2 * res3) % md


res = solve(a, b, c) % 998244353

print(res)


MOD = 998244353
def w(a, b):
    # SUM (k = 0..min) C(a, k) * C(b, k) * k!
    rt, ca, cb, fl = 1, 1, 1, 1
    for k in range(1, min(a, b) + 1):
        fl = fl * k % MOD
        ca = ca * (a - k + 1) // k
        cb = cb * (b - k + 1) // k
        rt = (rt + ((ca % MOD) * (cb % MOD) % MOD) * fl % MOD) % MOD
    return rt

a, b, c = map(int, input().split())
print(((w(a, b) % MOD) * w(b, c) % MOD) * w(c, a) % MOD)

a, b, c = [int(i) for i in input().split()]
n = max(a, b, c) + 1
mod = 998244353
f = [0] * (n + 1)
f[0] = 1
for i in range(1, n + 1):
    f[i] = (f[i-1] * i) % mod

def f_pow(a, k):
    if k == 0:
        return 1
    if k % 2 == 1:
        return f_pow(a, k - 1) * a % mod
    else:
        return f_pow(a * a % mod, k // 2) % mod

def C(n, k):
    d = f[k] * f[n - k] % mod
    return f[n] * f_pow(d, mod - 2) % mod
     
ans, cur = 1, 0

for i in range(min(a, b) + 1):
    cur += C(a, i) * C(b, i) * f[i]
    cur %= mod
ans, cur = (ans * cur) % mod, 0

for i in range(min(b, c) + 1):
    cur += C(b, i) * C(c, i) * f[i]
    cur %= mod
ans, cur = (ans * cur) % mod, 0

for i in range(min(a, c) + 1):
    cur += C(a, i) * C(c, i) * f[i]
    cur %= mod
    
print((ans * cur) % mod)


a, b, c = [int(i) for i in input().split()]
n = max(a, b, c) + 1
mod = 998244353
f = [0] * (n + 1)
f[0] = 1
for i in range(1, n + 1):
    f[i] = (f[i-1] * i) % mod

def f_pow(a, k):
    if k == 0:
        return 1
    if k % 2 == 1:
        return f_pow(a, k - 1) * a % mod
    else:
        return f_pow(a * a % mod, k // 2) % mod

def C(n, k):
    d = f[k] * f[n - k] % mod
    return f[n] * f_pow(d, mod - 2) % mod
     
ans, cur = 1, 0

for i in range(min(a, b) + 1):
    cur += C(a, i) * C(b, i) * f[i]
    cur %= mod
ans, cur = (ans * cur) % mod, 0

for i in range(min(b, c) + 1):
    cur += C(b, i) * C(c, i) * f[i]
    cur %= mod
ans, cur = (ans * cur) % mod, 0

for i in range(min(a, c) + 1):
    cur += C(a, i) * C(c, i) * f[i]
    cur %= mod
    
print((ans * cur) % mod)


import sys;
import time;

mod=998244353
def calc(a,b):
    if(a<b):
        a,b=b,a;
    s=0;
    t=1;
    for i in range(b+1):
        s=s+t;
        t=t*(a-i)//(i+1)*(b-i);
    return s;
        
(a,b,c)=list(map(int,sys.stdin.readline().split()));
start=time.time();
print(((calc(a,b)*calc(b,c)*calc(c,a))%mod));
end=time.time();
#print(end-start);


MOD = 998244353

def getAns(a,b):
    if(a<b):
        a,b=b,a;
    s=0;
    total=1;
    for i in range(b+1):
        s=s+total;
        total=total*(a-i)//(i+1)*(b-i);
    return s;

x = [int(i) for i in input().split()]
x.sort()
print((getAns(x[2],x[1]) * getAns(x[1],x[0]) * getAns(x[2],x[0]))%MOD)


mod = 998244353
maxn = 1005
'''
def q_mod(a,b):
    ans = 1
    a %= mod
    while b != 0:
        if b&1 == 1:
            ans = ans * a % mod
            b -= 1
        b >>= 1
        a = a * a % mod
    return ans

def C(n,m):
    if m >n :
        return 0
    ans = 1
    for i in range(1,m+1):
        a = (n + i - m) % mod
        b = i % mod
        ans = ans * (a * q_mod(b , mod-2) % mod ) % mod
    return ans 

def Lucas(n,m):
    if m == 0:
        return 1
    return  C(n % mod,m % mod) * Lucas(int(n/mod) , int(m/mod)) % mod
'''
'''
C = [ ([0]*maxn) for i in range(maxn)]

for i in range(2,maxn):
    for j in range(i+1):
        if j == 0 or j == i:
            C[i][j] = 1
            continue;
        C[i][j] = (C[i-1][j] + C[i-1][j-1]) % mod


def A(n,m):
    j = 0
    ans = 1
    for i in range(0,n+1):
        if j == m:
            break
        j += 1
        ans = (ans * (n - i)) % mod
    return ans

'''

def solve(n,m):
    if n > m:
        n , m = m , n
    ans , s = 0 , 1
    for i in range(0,n+1):
        ans = ans + s
        s =s * (n - i) // (i + 1) * (m - i)
    return ans
        

while True:
    try:
        a,b,c= list(map(int ,input().split()))
        print(solve(a,b) * solve(a,c)* solve(b,c) % mod)
    except:
        break



def pwm(a,pw,mod):
    ans = 1
    while pw:
        if pw&1:
            ans*=a
            ans%=mod
        a*=a
        pw>>=1
        a%=mod
    return ans

def precalc(mod):
    rfact[0]=1
    for i in range(1,5432):
        fact[i]=(fact[i-1]*i)%mod
        rfact[i]=pwm(fact[i],mod-2,mod)

def cnk(n,k,mod):
    return (fact[n]*rfact[k]*rfact[n-k])%mod
    
def calc(a,b,mod):
    ans = 0
    for k in range(min(a,b)+1):
        ans+=(cnk(a,k,mod)*cnk(b,k,mod)*fact[k])
        #print(a,b,cnk(a,k,mod),cnk(b,k,mod))
        ans%=mod
    return ans

fact = [1]*5432
rfact = [0]*5432
mod = 998244353
precalc(mod)
a,b,c = (int(z) for z in input().split())
res=calc(a,b,mod)*calc(a,c,mod)*calc(b,c,mod)
res%=mod
print(res)

import math

mod = 998244353

factmod = [0]*5001

factmod[0] = 1
for i in range(1, 5001):
	factmod[i] = (factmod[i-1] * i) % mod

	
def nCk(n,k):
	'''if k > n//2:
		k=n-k
	ret = 1
	for i in range(1, k+1):
		ret = ret * (n-i+1) // i
	return ret	'''
	if n==a:
		return aCks[k]
	if n==b:
		return bCks[k]
	if n==c:
		return cCks[k]
	xxx
	
	#return math.factorial(n) // math.factorial(k) // math.factorial(n-k)

def calc(x,y):
	nonlocal mod
	x,y = min(x,y), max(x,y)
	sm = 0
	for i in range(x+1):
		
		sm += ((nCk(x, i)) % mod) * ((nCk(y, i)) % mod) * ((factmod[i]) % mod)
		sm = sm % mod
	return sm

#print(factmod[5], nCk(5, 3))

a,b,c = list(map(int, input().split()))

aCks = [1]*(a+1)
for i in range(1, a):
	aCks[i] = aCks[i-1] * (a-i+1) // (i)
aCks = [aCks[i] % mod for i in range(len(aCks))]
#print(aCks[:a+1])

bCks = [1]*(b+1)
for i in range(1, b):
	bCks[i] = bCks[i-1] * (b-i+1) // (i)
bCks = [bCks[i] % mod for i in range(len(bCks))]

cCks = [1]*(c+1)
for i in range(1, c):
	cCks[i] = cCks[i-1] * (c-i+1) // (i)
cCks = [cCks[i] % mod for i in range(len(cCks))]

#print(aCks)
#print(bCks)
#print(cCks)
	

print((calc(a,b)*calc(b,c)*calc(a,c)) % mod)



f=[1]*50001
mod=998244353
for i in range(1,5001):
    f[i]=(f[i-1]*i)%mod
a,b,c=(int(i) for i in input().split())
def pwr(b,e):
    if(b==0): return 0
    if(e==0): return 1
    if(e%2==0):
        z=pwr(b,e/2)%mod
        return (z*z)%mod
    return (b*pwr(b,e-1))%mod
def nCr(n,r):
    den=(f[r]*f[n-r])%mod
    return (f[n]*pwr(den,mod-2))%mod
def g(x,y):
    mn=min([x,y])
    sm=0
    nonlocal mod
    for i in range(0,mn+1):
        sm+=(nCr(x,i)*nCr(y,i)*f[i])%mod
        sm=sm%mod
    return sm
ans=g(a,b)*g(b,c)*g(c,a)
ans=ans%mod
print(int(ans))
    


a, b, c = list(map(int, input().split(' ')))
p = 998244353

def calc (a, b) :
	if a > b:
		a, b = b, a
	ans = 0
	tmp = 1
	for i in range(a + 1):
		ans = (ans + tmp) % p
		tmp = tmp * (a - i) * (b - i) * pow(i + 1, p - 2, p) % p
	return ans

ans = calc(a, b) * calc(b, c) * calc(a, c) % p

print(ans)


a, b, c = map(int, input().split(' '))
p = 998244353

def calc (a, b) :
	if a > b:
		a, b = b, a
	ans = 0
	tmp = 1
	for i in range(a + 1):
		ans = (ans + tmp) % p
		tmp = tmp * (a - i) * (b - i) * pow(i + 1, p - 2, p) % p
	return ans

ans = calc(a, b) * calc(b, c) * calc(a, c) % p

print(ans)

# -*- coding: utf-8 -*-

import math
import collections
import bisect
import heapq
import time
import random

"""
created by shhuan at 2017/10/6 22:19

"""

t0 = time.time()
a, b, c = list(map(int, input().split()))

def ct(a, b):
    if a > b:
        a, b = b, a
    L=998244353
    s=1
    sx=1
    for k in range(1,a+1):
        s = s*(a+1-k)*(b+1-k)//k
        sx += s % L
    return sx

L=998244353

print(ct(a,b)*ct(a,c)*ct(b,c)%L)

# print(time.time()-t0)

# p = [[0 for _ in range(MAXN)] for _ in range(MAXN)]
# for i in range(1, MAXN):
#     p[i][0] = 1
#     for j in range(1, i+1):
#         p[i][j] = (p[i-1][j-1]+p[i-1][j]) % MOD
# print(time.time() - t0)
# pre = [0] * MAXN
# pre[0] = 1
# for i in range(1, MAXN):
#     pre[i] = (i*pre[i-1]) % MOD
#
#
# def solve(x, y):
#     ans = 0
#     for k in range(min(x, y)+1):
#         d = pre[k]
#         d = (d*p[x][k]) % MOD
#         d = (d*p[y][k]) % MOD
#         ans = (ans+d) % MOD
#
#     return ans
#
# ans = 1
# ans = (ans * solve(a, b)) % MOD
# ans = (ans * solve(b, c)) % MOD
# ans = (ans * solve(a, c)) % MOD
# print(ans)
#
# print(time.time() - t0)


"""http://codeforces.com/problemset/problem/869/C"""

def calc(x,y):
    si, ans = 1, 1
    n,m = min(x,y), max(x,y)
    for i in range(1,n+1):
        si = (si * (n-i+1) * (m-i+1) // i)
        ans = (ans + si)
    return ans % MOD


MOD = 998244353
a,b,c = list(map(int, input().split()))
rb = calc(a,b)
rp = calc(a,c)
bp = calc(b,c)
res = rb*rp*bp % MOD
print(res)



a, b, c = map(int, input().split())
M = 998244353
def calc(a, b) :
	if a > b:
		a, b = b, a
	ans = 0
	t = 1
	for i in range(a + 1):
		ans = (ans + t) % M
		t = t * (a - i) * (b - i) * pow(i + 1, M - 2, M) % M
	return ans
ans = calc(a, b) * calc(b, c) * calc(a, c) % M
print(ans)

mod = 998244353

def binpow(num, p):
    if(p == 0):
        return 1
    if(p % 2 == 0):
        return binpow((num * num) % mod, p // 2)
    return (num * binpow(num, p - 1)) % mod

def rev(num):
    return binpow(num, mod - 2)

def solve(a, b):
    result = 1
    prev = 1
    for k in range(1, min(a, b) + 1):
        now = (prev * (a - (k - 1)) * (b - (k - 1)) * rev(k)) % mod
        result  = (result + now) % mod
        prev = now
    return (result) % mod

a, b, c = list(map(int, input().split()))

res1 = solve(a, b)
res2 = solve(b, c)
res3 = solve(a, c)

print((res1 * res2 * res3) % mod)