C. Iván Gives a Riddle
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

While explaining the solutions to the Math Contest problems at the Third Winter Training Camp at ESCOM, Iván came up with the following idea to challenge the participants:

You are given two big numbers $$$A$$$ and $$$B$$$ that does not contain the digit $$$0$$$. These numbers can be modified by performing two types of operations:

  1. Swap two adjacent digits in one of the numbers. For example, if $$$B=2468$$$, performing this type of operation can result in $$$B=4268$$$, $$$B=2648$$$, or $$$B=2486$$$. Note that you can perform this operation on $$$A$$$ as well.
  2. Swap the least significant digits of $$$A$$$ and $$$B$$$. For example, if $$$A=348$$$ and $$$B=1234$$$, performing this type of operation will result in $$$A=344$$$ and $$$B=1238$$$.

Find the maximum value of $$$A+B$$$ that you can get by performing the operations above any number of times and in any order. As this number might be huge, print it modulo $$$998244353$$$.

Input

The first line contains two integers $$$A$$$ and $$$B$$$ ($$$1 \leq A,B \lt 10^{10,000}$$$) – the numbers given in the riddle. It is guaranteed that the numbers does not contain any digit $$$0$$$.

Output

Print a single integer – the maximum value of $$$A+B$$$ modulo $$$998244353$$$.

Examples
Input
5
8
Output
13
Input
348
2468
Output
9485
Input
999999937
998244353
Output
3494159