func_code_string: #include <bits/stdc++.h>   using namespace std;   const int INF = 0x3f3f3f3f;   const long long INFF = 0x3f3f3f3f3f3f3f3fll;   const long long M = 998244353;   const long long maxn = 1e6 + 107;   const double pi = acos(-1.0);   const double eps = 0.0000000001;   long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }   template <typename T>   inline void pr2(T x, int k = 64) {     long long i;     for (i = 0; i < k; i++) fprintf(stderr,  %d , (x >> i) & 1);     putchar(   );   }   template <typename T>   inline void add_(T &A, int B, long long MOD = M) {     A += B;     (A >= MOD) && (A -= MOD);   }   template <typename T>   inline void mul_(T &A, long long B, long long MOD = M) {     A = (A * B) % MOD;   }   template <typename T>   inline void mod_(T &A, long long MOD = M) {     A %= MOD;     A += MOD;     A %= MOD;   }   template <typename T>   inline void max_(T &A, T B) {     (A < B) && (A = B);   }   template <typename T>   inline void min_(T &A, T B) {     (A > B) && (A = B);   }   template <typename T>   inline T abs(T a) {     return a > 0 ? a : -a;   }   inline long long powMM(long long a, long long b, long long mod = M) {     long long ret = 1;     for (; b; b >>= 1ll, a = a * a % mod)       if (b & 1) ret = ret * a % mod;     return ret;   }   int startTime;   void startTimer() { startTime = clock(); }   void printTimer() {     fprintf(stderr,  /--- Time: %ld milliseconds ---/ n , clock() - startTime);   }   long long kth[maxn];   long long freq[maxn];   int main() {     int i, n;     scanf( %d , &n);     for (i = 1; i <= n; i++) {       int a, f;       scanf( %d%d , &a, &f);       freq[a] += f;     }     kth[1] = 1;     int ans = 0;     for (i = 1; i <= 100000; i++) {       long long a1 = 0, a2 = 0;       long long cnt = 0;       for (int j = i; j <= 100000; j += i) {         if (j != i) add_(kth[j], M - kth[i]);         add_(a1, freq[j] % M * j % M);         add_(a2, freq[j] % M * j % M * j % M);         cnt += freq[j];       }       if (cnt <= 1) continue;       long long axy = (a1 * a1 % M - a2 + M) % M;       long long nowval = 0;       long long base1 = (cnt - 1) % M * powMM(2, cnt - 2) % M;       long long base2 = (powMM(2, cnt - 2));       if (cnt >= 3) base2 += (cnt - 2) % M * powMM(2, cnt - 3) % M;       add_(nowval, a2 * base1 % M);       add_(nowval, axy * base2 % M);       add_(ans, nowval * kth[i] % M);     }     printf( %d n , ans);   }   