You are given an infinite set S={(x,y)|x,y∈Z,¬∃i,j∈Zs.t.x=2i+j,y=i−2j}and two pairs (x1,y1),(x2,y2)∈S.
You have a pair (x,y) in your right pocket which equals to (x1,y1) in the beginning. You can pay Y_UME a coin at a time and then change (x,y) to one element in S whose distance to (x,y) is 1. The distance between (a1,b1) and (a2,b2) is defined as |a1−a2|+|b1−b2|.
You expect to get (x2,y2) and minimize the number of coins given to Y_UME. Output the minimum number of coins and output the number of different ways to achieve the goal modulo 998244353.
Note that two ways differ if and only if there exsits some i such that i-th steps in the two ways are different.