{"raw_statement":[{"iden":"problem statement","content":"There are non-negative integers $A$, $B$, $C$, $D$, $E$, and $F$, which satisfy $A\\times B\\times C\\geq D\\times E\\times F$.  \nFind the remainder when $(A\\times B\\times C)-(D\\times E\\times F)$ is divided by $998244353$."},{"iden":"constraints","content":"*   $0\\leq A,B,C,D,E,F\\leq 10^{18}$\n*   $A\\times B\\times C\\geq D\\times E\\times F$\n*   $A$, $B$, $C$, $D$, $E$, and $F$ are integers."},{"iden":"input","content":"The input is given from Standard Input in the following format:\n\n$A$ $B$ $C$ $D$ $E$ $F$"},{"iden":"sample input 1","content":"2 3 5 1 2 4"},{"iden":"sample output 1","content":"22\n\nSince $A\\times B\\times C=2\\times 3\\times 5=30$ and $D\\times E\\times F=1\\times 2\\times 4=8$,  \nwe have $(A\\times B\\times C)-(D\\times E\\times F)=22$. Divide this by $998244353$ and print the remainder, which is $22$."},{"iden":"sample input 2","content":"1 1 1000000000 0 0 0"},{"iden":"sample output 2","content":"1755647\n\nSince $A\\times B\\times C=1000000000$ and $D\\times E\\times F=0$,  \nwe have $(A\\times B\\times C)-(D\\times E\\times F)=1000000000$. Divide this by $998244353$ and print the remainder, which is $1755647$."},{"iden":"sample input 3","content":"1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000 1000000000000000000"},{"iden":"sample output 3","content":"0\n\nWe have $(A\\times B\\times C)-(D\\times E\\times F)=0$. Divide this by $998244353$ and print the remainder, which is $0$."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}