#include <bits/stdc++.h>
using namespace std;
using lint = long long int;
struct fast_ios { fast_ios(){ cin.tie(0); ios::sync_with_stdio(false); cout << fixed << setprecision(20); }; } fast_ios_;
#define FOR(i, begin, end) for(int i=(begin);i<(end);i++)
#define IFOR(i, begin, end) for(int i=(end)-1;i>=(begin);i--)
#define REP(i, n) FOR(i,0,n)
#define IREP(i, n) IFOR(i,0,n)

template <int mod>
struct ModInt
{
    using lint = long long;
    int val;
    ModInt() : val(0) {}
    void _setval(lint v) { v = (v % mod) + mod; val = v >= mod ? v - mod : v; }
    ModInt(lint v) { _setval(v); }
    ModInt operator+(const ModInt &x) const { return ModInt((lint)val + x.val); }
    ModInt operator-(const ModInt &x) const { return ModInt((lint)val - x.val); }
    ModInt operator*(const ModInt &x) const { return ModInt((lint)val * x.val); }
    ModInt operator/(const ModInt &x) const { return ModInt((lint)val * x.inv().val); }
    ModInt operator-() const { return ModInt(-val); }
    ModInt &operator+=(const ModInt &x) { return *this = *this + x; }
    ModInt &operator-=(const ModInt &x) { return *this = *this - x; }
    ModInt &operator*=(const ModInt &x) { return *this = *this * x; }
    ModInt &operator/=(const ModInt &x) { return *this = *this / x; }
    bool operator==(const ModInt &x) { return val == x.val; }
    bool operator!=(const ModInt &x) { return val != x.val; }
    friend ostream &operator<<(ostream &os, const ModInt &x) { os << x.val;  return os; }

    lint power(lint n) const {
        ModInt ans(1), tmp(val);
        while (n) {
            if (n & 1) ans *= tmp;
            tmp *= tmp;
            n /= 2;
        }
        return ans.val;
    }
    ModInt inv() const { return this->power(mod - 2); }
    
    ModInt fac() const {
        static vector<ModInt> facs;
        int l0 = facs.size();
        if (l0 > this->val) return facs[this->val];

        facs.resize(this->val + 1);
        for (int i = l0; i <= this->val; i++) facs[i] = (i == 0 ? 1 : facs[i - 1] * i);
        return facs[this->val];
    }

    ModInt nCr(const ModInt &r) const {
        if (this->val < r.val) return ModInt(0);
        return this->fac() / ((*this - r).fac() * r.fac());
    }
};
using mint = ModInt<1000000007>;


int N, M;
vector<int> x, y;
vector<int> l, r;

// 1-indexed BIT (i : [1, len])
template<typename T, int len>
struct BIT
{
    array<T, len + 1> val;
    BIT() { val.fill(0); }
    void add(int pos, T v)
    {
        while (pos > 0 && pos <= len)
        {
            val[pos] += v;
            pos += pos & -pos;
        }
    }
    T sum(int pos)
    {
        T res = 0;
        while (pos > 0)
        {
            res += val[pos];
            pos -= pos & -pos;
        }
        return res;
    }
};


int main()
{
    cin >> N >> M;
    x.resize(N);
    y.resize(M);
    REP(i, N) cin >> x[i];
    REP(i, M) cin >> y[i];

    int N1 = 0;
    REP(i, N)
    {
        if (x[i] < y[0] || x[i] >= y[M - 1]) continue;
        N1++;
        r.push_back(*lower_bound(y.begin(), y.end(), x[i]) - x[i]);
        l.push_back(x[i] - *(lower_bound(y.begin(), y.end(), x[i]) - 1));
    }
    set<int> zl;
    for (auto v : l) zl.insert(v);
    map<int, int> ml;
    int i = 2;
    for (auto v : zl) ml[v] = i, i = i + 1;

    using pint = pair<int, int>;
    set<pint> R;
    REP(i, N1) R.insert(make_pair(r[i], -ml[l[i]]));

    BIT<mint, 100001> dp;
    dp.add(1, 1);
    for (auto v : R)
    {
        int ml = -v.second;
        mint add_val = dp.sum(ml - 1);
        dp.add(ml, add_val);
    }
    cout << dp.sum(100000) << endl;
}


Measured memory_bytes: 15732