There is an edge-weighted complete graph $K_n$ with $n$ vertices, where vertices are labeled through $1,2,...,n$.
For each $1\leq i\lt j\leq n$, the weight of the edge $(i,j)$ between $i$ and $j$ is $gcd(i,j)$, the greatest common divisor of $i$ and $j$.
You need to answer $q$ queries. In each query, given two vertices $u,v$, you need to answer the <strong> length of the shortest path</strong> as well as the <strong>number of shortest paths</strong> between $u,v$. Since the <strong>number of shortest paths</strong> may be too large, you only need to output it modulo $998244353$.