#include #include #include using namespace std; const int N = 1e6+10,mod=998244353; typedef long long LL; int main(){ LL n,m; LL ans=0; scanf("%lld%lld",&n,&m); for(LL i=1,j;i<=m;i=j+1){ LL t=n/i; if(t==0)break; j=min(n/t,m); LL sum=(j-i+1)*(j+i)/2; ans+=sum*(t+t*(t+1)/2)%mod; ans%=mod; } cout<