/// IN THE NAME OF METAL
#include <bits/stdc++.h>
 
using namespace std;
 
typedef long long int ll;
typedef pair<ll, ll> pll;
 
#define sz(x)                       (ll) x.size()
#define all(x)                      (x).begin(),(x).end()
#define F                           first
#define S                           second

ll Pow(ll a, ll b, ll md, ll ans = 1) {
    for (; b; b >>= 1, a = a * a % md)
        if (b & 1)
            ans = ans * a % md;
    return ans % md;
}
const ll MAXN = 1e5 + 10;
const ll INF = 8e18;
const ll MOD = 1e9 + 7;
ll fen[MAXN], X[MAXN], Y[MAXN], n, m;
vector<pll> compress; vector<ll> vec;

void update(ll pos, ll val) {
    for (pos += 5; pos < MAXN; pos += pos & -pos) 
        fen[pos] = (fen[pos] + val) % MOD;
}

ll get(ll pos) {
    ll res = 0;
    for (pos += 5; pos; pos -= pos & -pos) {
        res = (res + fen[pos]) % MOD;
    }
    return res;
}

int main() {
    scanf("%lld%lld", &n, &m);
    for (ll i = 1; i <= n; i++) {
        scanf("%lld", &X[i]);
    }
    for (ll i = 1; i <= m; i++) {
        scanf("%lld", &Y[i]);
    }
    for (ll i = 1; i <= n; i++) {
        if (X[i] < Y[1] || X[i] > Y[m]) continue;
        ll ptr = lower_bound(Y + 1, Y + m + 1, X[i]) - Y;
        vec.push_back(X[i] - Y[ptr - 1]);
        compress.push_back({Y[ptr] - X[i], Y[ptr - 1] - X[i]});
    }
    sort(all(vec));
    sort(all(compress));
    vec.resize(unique(all(vec)) - vec.begin());
    compress.resize(unique(all(compress)) - compress.begin());
    update(0, 1);
    for (ll i = 0; i < sz(compress); i++) {
        pll &t = compress[i];
        update(lower_bound(all(vec), -t.S) - vec.begin() + 1, get(lower_bound(all(vec), -t.S) - vec.begin()));
    }
    printf("%lld\n", get(MAXN - 10));
    return 0;
}

