#arc154a. [arc154_a]Swap Digit

[arc154_a]Swap Digit

Problem Statement

You are given NN-digit positive integers AA and BB whose topmost digits are not 00.

You can repeat the following operation any number of times (possibly zero).

  • Choose an integer ii such that 1leileN1 \\le i \\le N and swap the ii-th lowest digits of AA and BB.

Find the smallest possible value of AtimesBA \\times B after your operations, modulo 998244353998244353.

Note that you are not asked to minimize the remainder when AtimesBA \\times B is divided by 998244353998244353.

Constraints

  • 1leNle2000001 \\le N \\le 200000
  • AA and BB are NN-digit positive integers whose topmost digits are not 00.

Input

The input is given from Standard Input in the following format:

NN AA BB

Output

Print a single line containing the answer.


Sample Input 1

2
13
22

Sample Output 1

276

You can make AtimesB=276A \\times B = 276 by performing the operation once, as follows.

  • Choose i=1i=1 to swap the bottommost digits of AA and BB, making A=12,B=23A=12, B=23.

You cannot make AtimesB=275A \\times B = 275 or less, so the answer is 276276.


Sample Input 2

8
20220122
21002300

Sample Output 2

54558365

Find the value modulo 998244353998244353.