#include #include using namespace std; typedef long long ll; int used[3000010]; ll ans = 0,h,w; constexpr ll mod = 1000000007; void solve(int x){ int y = x; vector fac; while(y!=1){ int k = used[y]; fac.push_back(k); while(y%k==0 && y!=1){ y /= k; } } int i,j,s = fac.size(); ll num = 0,sum = 0; for(i=0;i<(1<> h >> w; for(i=1;i<=3000000;i++){ used[i] = -1; } for(i=2;i