#include using namespace std; typedef long long ll; typedef pair P; #define REP(i,n) for(ll i=0;i> N >> M; ll ans=0; for(i=1;i<=N;i++){ for(j=1;j<=M;j++){ ans+=lcm(i,j); ans%=MOD; } } cout << ans << endl; return 0; }