#include <iostream>
#include <cstdio>
#include <algorithm>
#define int long long
using namespace std;
const int N = 1e5 + 5;
const int mod = 1e9 + 7;
int n, m, cnt, tr[N], f[N], a[N], b[N], S[N], top, tot, ans;
pair<int, int> p[N];
inline int read()
{
	int x = 0, f = 1; char ch = getchar();
	while(ch < '0' || ch > '9') {if(ch == '-') f = -1; ch = getchar();}
	while(ch >= '0' && ch <= '9') {x = (x << 3) + (x << 1) + (ch ^ 48); ch = getchar();}
	return x * f;
}
bool cmp(pair<int, int> a, pair<int, int> b) {return a.first == b.first ? a.second > b.second : a.first < b.first;}
int lowbit(int x) {return x & (- x);}
void add(int x, int y) {while(x <= cnt) tr[x] = (tr[x] + y) % mod, x += lowbit(x);}
int query(int x) {int res = 0; while(x) res = (res + tr[x]) % mod, x -= lowbit(x); return res;}
signed main()
{
//	freopen(".in", "r", stdin);
//	freopen(".out", "w", stdout);
	n = read(); m = read();
	for(int i = 1; i <= n; i ++) a[i] = read();
	for(int i = 1; i <= m; i ++) b[i] = read();
	for(int i = 1; i <= n; i ++)
	{
		if(a[i] <= b[1] || a[i] >= b[m]) continue;
		int x = lower_bound(b + 1, b + m + 1, a[i]) - b;
		p[++ cnt] = make_pair(a[i] - b[x - 1], b[x] - a[i]);
		S[++ top] = b[x] - a[i];
	}
	sort(S + 1, S + top + 1); tot = unique(S + 1, S + top + 1) - S - 1;
	for(int i = 1; i <= cnt; i ++) p[i].second = lower_bound(S + 1, S + tot + 1, p[i].second) - S;
	sort(p + 1, p + cnt + 1, cmp); cnt = unique(p + 1, p + cnt + 1) - p - 1;
	f[0] = 1;
	for(int i = 1; i <= cnt; i ++) f[i] = query(p[i].second - 1) + 1, add(p[i].second, f[i]);
	for(int i = 0; i <= cnt; i ++) ans = (ans + f[i]) % mod;
	printf("%lld\n", ans);
	fclose(stdin);
	fclose(stdout);
	return 0;
}
