#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;

// modint: mod 計算を int を扱うように扱える構造体
template<int MOD> struct Fp {
    long long val;
    constexpr Fp(long long v = 0) noexcept : val(v % MOD) {
        if (val < 0) val += MOD;
    }
    constexpr int getmod() { return MOD; }
    constexpr Fp operator - () const noexcept {
        return val ? MOD - val : 0;
    }
    constexpr Fp operator + (const Fp& r) const noexcept { return Fp(*this) += r; }
    constexpr Fp operator - (const Fp& r) const noexcept { return Fp(*this) -= r; }
    constexpr Fp operator * (const Fp& r) const noexcept { return Fp(*this) *= r; }
    constexpr Fp operator / (const Fp& r) const noexcept { return Fp(*this) /= r; }
    constexpr Fp& operator += (const Fp& r) noexcept {
        val += r.val;
        if (val >= MOD) val -= MOD;
        return *this;
    }
    constexpr Fp& operator -= (const Fp& r) noexcept {
        val -= r.val;
        if (val < 0) val += MOD;
        return *this;
    }
    constexpr Fp& operator *= (const Fp& r) noexcept {
        val = val * r.val % MOD;
        return *this;
    }
    constexpr Fp& operator /= (const Fp& r) noexcept {
        long long a = r.val, b = MOD, u = 1, v = 0;
        while (b) {
            long long t = a / b;
            a -= t * b; swap(a, b);
            u -= t * v; swap(u, v);
        }
        val = val * u % MOD;
        if (val < 0) val += MOD;
        return *this;
    }
    constexpr bool operator == (const Fp& r) const noexcept {
        return this->val == r.val;
    }
    constexpr bool operator != (const Fp& r) const noexcept {
        return this->val != r.val;
    }
    friend constexpr ostream& operator << (ostream &os, const Fp<MOD>& x) noexcept {
        return os << x.val;
    }
    friend constexpr istream& operator >> (istream &is, Fp<MOD>& x) noexcept {
        return is >> x.val;
    }
    friend constexpr Fp<MOD> modpow(const Fp<MOD> &a, long long n) noexcept {
        if (n == 0) return 1;
        auto t = modpow(a, n / 2);
        t = t * t;
        if (n & 1) t = t * a;
        return t;
    }
};

const int MOD = 1000000007;
using mint = Fp<MOD>;


template <class Abel> struct BIT {
    const Abel UNITY_SUM = 0;                       // to be set
    vector<Abel> dat;
    
    /* [1, n] */
    BIT(int n) : dat(n + 1, UNITY_SUM) { }
    void init(int n) { dat.assign(n + 1, UNITY_SUM); }
    
    /* a is 1-indexed */
    inline void add(int a, Abel x) {
        for (int i = a; i < (int)dat.size(); i += i & -i)
            dat[i] = dat[i] + x;
    }
    
    /* [1, a], a is 1-indexed */
    inline Abel sum(int a) {
        Abel res = UNITY_SUM;
        for (int i = a; i > 0; i -= i & -i)
            res = res + dat[i];
        return res;
    }
    
    /* [a, b), a and b are 1-indexed */
    inline Abel sum(int a, int b) {
        return sum(b - 1) - sum(a - 1);
    }
    
    /* debug */
    void print() {
        for (int i = 1; i < (int)dat.size(); ++i) cout << sum(i, i + 1) << ",";
        cout << endl;
    }
};


const long long INF = 1LL<<55;
using pll = pair<long long,long long>;

// 入力
int N, M;
vector<long long> x, y, v, uv;
vector<pll> lrs;

mint solve() {
    // 区間に変換
    vector<pll> lrs;
    vector<long long> uright;
    for (int i = 0; i < N; ++i) {
        int it = lower_bound(y.begin(), y.end(), x[i]) - y.begin();
        if (it == 0 || it == M) continue; // 両端は一意なので除く
        lrs.push_back(pll(y[it-1] - x[i], y[it] - x[i]));
        uright.push_back(y[it] - x[i]);
    }

    // 区間ソート
    sort(lrs.begin(), lrs.end());
    lrs.erase(unique(lrs.begin(), lrs.end()), lrs.end()); // 同一の区間は除く
    sort(uright.begin(), uright.end());
    uright.erase(unique(uright.begin(), uright.end()), uright.end());
    int s = uright.size();

    //COUT(v);
    BIT<mint> bit(N+10);
    bit.add(s+1, 1);
    for (auto lr : lrs) {
        int k = lower_bound(uright.begin(), uright.end(), lr.second)
            - uright.begin();
        ++k;
        mint sum = bit.sum(k+1, s+2);
        bit.add(k, sum);

        //COUT(vi); COUT(k); COUT(sum); bit.print();
    }
    return bit.sum(1, s+2);
}

int main() {
    while (cin >> N >> M) {
        x.resize(N); y.resize(M);
        for (int i = 0; i < N; ++i) cin >> x[i];
        for (int i = 0; i < M; ++i) cin >> y[i];
        cout << solve() << endl;
    }
}
            


Measured memory_bytes: 5232