/*
　　　　　／＞　 フ
　　　　　| 　_　 _|
　 　　　／`ミ _x 彡
　　 　 /　　　 　 |
　　　 /　  ヽ　　 ?
　／￣|　　 |　|　|
　| (￣ヽ＿_ヽ_)_)
　＼二つ
 */
#pragma GCC optimize("Ofast","inline","-ffast-math")
#pragma GCC target("avx,sse2,sse3,sse4,mmx")
#include<bits/stdc++.h>
#define int long long
#define pb push_back
#define pf push_front
#define F first
#define S second
#define SS stringstream
#define sqr(x) ((x)*(x))
#define m0(x) memset(x,0,sizeof(x))
#define m1(x) memset(x,63,sizeof(x))
#define CC(x) cout << (x) << endl
#define AL(x) x.begin(),x.end()
#define pw(x) (1ull<<(x))
#define NMSL cout << "NMSL" << endl;
#define debug(x) cout << #x << ": " << x << endl;
#define debug2(x, y) cout <<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl;
#define debug3(x, y, z) cout <<#x<<": "<<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl;
#define debug4(a, b, c, d) cout <<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl;
#define fio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define in128 __int128_t
using namespace std;
const int N = 2e6+10;
const int INF = numeric_limits<int>::max() / 4;
const double EPS = 1e-3;
const long double PI = 3.14159265358979323846;
const int mod = 998244353 ;
int fac[N],inv[N];
int n,m;
int ppow(int a,int b=mod-2)
{
    int ans=1%mod;
    a%=mod;
    while(b)
    {
        if(b&1)
            ans=ans*a%mod;
        a=a*a%mod;
        b>>=1;
    }
    return ans;
}
void init()
{
    fac[0]=1;
    for(int i=1; i<N; ++i)
        fac[i]=fac[i-1]*i%mod;
    inv[N-1]=ppow(fac[N-1]);
    for(int i=N-2; i>=0; --i)
        inv[i]=(i+1)*inv[i+1]%mod;
}
int C(int n,int m)
{
    if(m<0||m>n)return 0;
    return fac[n]*inv[m]%mod*inv[n-m]%mod;
}
signed main()
{
    fio
    init();
    cin>>n>>m;
    int ans=0;
    for(int i=1; i<=m; ++i)
    {
        int x=i,sum=1;
        vector<int>temp;
        for(int j=2; j*j<=x; ++j)
        {
            int cnt=0;
            while(x%j==0)
            {
                x/=j;
                cnt++;
            }
            if(cnt)
                temp.push_back(cnt);
        }
        if(x>1)temp.push_back(1);
        for(int b : temp)
            sum=sum*C(n+b-1,b)%mod;
        ans=(ans+sum)%mod;
    }cout<<ans;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;

#define ll long long
const int maxn = 1e6+1;
const int neginf  = -1*1e8;

int main(){
    vector<ll> arr(maxn+1, 0);
    ll l, r; cin>>l>>r;
    for(ll i = 2; i <= r; i++){
        if(arr[i]!=0)continue;
        for(ll j = i; j<= r; j+= i)arr[j]++;
        for(ll j = i*i; j<= r; j+= i*i) arr[j] = neginf;
    }
    ll ans = 0;
    for(int i = 2; i<= r; i++){
        if(arr[i]<0) continue;
        ll num = (r/i) - ((l-1)/i);
        ll temp = (num*(num-1))/2;
        if(arr[i]%2) ans += temp;    // odd number of prime factors are included
        else ans -= temp;            // even number of prime factors are excluded
    }

    for(int i = max(2ll, l); i<=r; i++) ans -= ((r/i)-1);
    cout<<ans*2;
    return 0;
}