#include<cstdio>
#include<cstring>
#include<algorithm>
#define ll long long
using namespace std;
const ll N=2e5+10,P=998244353;
ll n,m,f[20][N],fac[N],inv[N],ans;
ll C(ll n,ll m)
{return fac[n]*inv[m]%P*inv[n-m]%P;}
signed main()
{
	scanf("%lld%lld",&n,&m);
	ll k=0;inv[1]=1;
	for(ll i=2;i<=n;i++)
		inv[i]=P-inv[P%i]*(P/i)%P;
	fac[0]=inv[0]=1;
	for(ll i=1;i<=n;i++)
		fac[i]=fac[i-1]*i%P,inv[i]=inv[i-1]*inv[i]%P;
	while((1<<(k+1))<=m)k++;k=min(k,n-1);
	for(ll i=1;i<=m;i++)f[1][i]=1;
	for(ll i=1;i<=k;i++)
		for(ll j=1;j<=m;j++){
			if(!f[i][j])continue;
			for(ll k=2*j;k<=m;k+=j)
				(f[i+1][k]+=f[i][j])%=P;
		}
	for(ll i=1;i<=k+1;i++)
		for(ll j=1;j<=m;j++)
			(ans+=f[i][j]*C(n-1,i-1)%P)%=P;
	printf("%lld\n",ans);
	return 0;
}
#include <bits/stdc++.h>
#define rep(i, a, b) for (int i = a; i <= b; i++)
#define per(i, a, b) for (int i = a; i >= b; i--)
using namespace std;

typedef unsigned long long ull;
typedef pair <int, int> pii;
typedef long long ll;

template <typename _T>
inline void read(_T &f) {
    f = 0; _T fu = 1; char c = getchar();
    while (c < '0' || c > '9') { if (c == '-') { fu = -1; } c = getchar(); }
    while (c >= '0' && c <= '9') { f = (f << 3) + (f << 1) + (c & 15); c = getchar(); }
    f *= fu;
}

template <typename T>
void print(T x) {
    if (x < 0) putchar('-'), x = -x;
    if (x < 10) putchar(x + 48);
    else print(x / 10), putchar(x % 10 + 48);
}

template <typename T>
void print(T x, char t) {
    print(x); putchar(t);
}

const int N = 1e5 + 5;

int a[N], b[N], f[2][N];
int n, len[2];
ll ans;

int main() {
    memset(f, -0x3f, sizeof(f));
    read(n);
    for (int i = 1; i <= n; i++) read(a[i]), ans += a[i];
    for (int i = 1; i <= n; i++) read(b[i]), b[i] -= a[i];
    for (int i = 1; i <= n; i++) f[i & 1][++len[i & 1]] = b[i];
    sort(f[0] + 1, f[0] + len[0] + 1); reverse(f[0] + 1, f[0] + len[0] + 1);
    sort(f[1] + 1, f[1] + len[1] + 1); reverse(f[1] + 1, f[1] + len[1] + 1);
    for (int i = 1; i <= n / 2; i++) {
        if (f[0][i] + f[1][i] < 0) break;
        ans += f[0][i] + f[1][i];
    }
    print(ans, '\n');
    return 0;
}