#include<iostream>
#include<cstring>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<map>
#include<queue>
#include<stack>
#include<iomanip>

using namespace std;

const int N = 1e5 + 10;
const int mod = 1e9 + 7;

int n, m, cnt, a[N], b[N];
int tmpx[N], tmpy[N], c1, c2;

struct node {
	int x, y;
	bool operator < (const node &T) const {
		return x == T.x ? y > T.y : x < T.x;
	}
}A[N];

struct Fenwick_Tree {
	int s[N];
	void update(int x, int y) {for(; x <= c2; x += x & -x) (s[x] += y) %= mod;}
	int query(int x) {int res = 0; for(; x; x -= x & -x) (res += s[x]) %= mod; return res;}
}T;

void Init() {
	int x; priority_queue<int, vector<int>, greater<int> > q;
	cin >> n >> m;
	for(int i = 1; i <= n; ++ i) cin >> x, q.push(x);
	for(int i = 1; i <= m; ++ i) cin >> b[i]; n = 0;
	while(!q.empty()) {
		int k = q.top(), pos = lower_bound(b + 1, b + m + 1, k) - b; q.pop();
		if(k <= b[1] || k >= b[m] || b[pos] == k) continue;
		A[++ cnt].x = b[pos] - k; A[cnt].y = k - b[pos - 1];
		tmpx[++ c1] = A[cnt].x, tmpy[++ c2] = A[cnt].y;
	}
	sort(tmpx + 1, tmpx + c1 + 1), sort(tmpy + 1, tmpy + c2 + 1);
	c1 = unique(tmpx + 1, tmpx + c1 + 1) - tmpx - 1;
	c2 = unique(tmpy + 1, tmpy + c2 + 1) - tmpy - 1;
	for(int i = 1; i <= cnt; ++ i) {
		A[i].x = lower_bound(tmpx + 1, tmpx + c1 + 1, A[i].x) - tmpx;
		A[i].y = lower_bound(tmpy + 1, tmpy + c2 + 1, A[i].y) - tmpy;
	}
	sort(A + 1, A + cnt + 1);
}

void Solve() {
	int ans = 1;
	for(int i = 1; i <= cnt; ++ i) {
		if(A[i].y == A[i - 1].y && A[i].x == A[i - 1].x) continue;
		int now = T.query(A[i].y - 1) + 1;
		(ans += now) %= mod;
		T.update(A[i].y, now);
	}
	cout << ans << endl;
}


int main() {
#ifdef ylsakioi
#endif
	Init();
	Solve();
	return 0;
}