#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
int n, m, i, j, mod = 1e9 + 7, a[100005], b[100005];
vector<pair<int, int> > v;
vector<int> all;
struct bit
{
	int lowbit(int x) { return x & (-x); }
	int a[100005];
	void add(int x, int y)
	{
		int i;
		for (i = x; i <= 100002; i += (lowbit(i))) (a[i] += y) %= mod;
	}
	int query(int x)
	{
		int s = 0, i;
		for (i = x; i; i -= lowbit(i)) (s += a[i]) %= mod;
		return s;
	}
}c;
int main()
{
	cin >> n >> m;
	for (i = 1; i <= n; i++)
	{
		cin >> a[i];
	}
	for (i = 1; i <= m; i++)
	{
		cin >> b[i];
	}
	for (i = 1; i <= n; i++)
	{
		int t = lower_bound(b + 1, b + m + 1, a[i]) - b;
		if (t >= 2 && t <= m)
		{
			v.push_back(make_pair(a[i] - b[t - 1], -(b[t] - a[i])));
			all.push_back(b[t] - a[i]);
		}
	}
	c.add(1, 1);
	sort(v.begin(), v.end());
	sort(all.begin(), all.end());
	all.resize(unique(all.begin(), all.end()) - all.begin());
	for (i = 0; i < v.size(); i++)
	{
		if (!i || v[i] != v[i - 1])
		{
			int t = upper_bound(all.begin(), all.end(), -v[i].second) - all.begin();
			c.add(t + 1, c.query(t));
		}
	}
	cout << c.query(100002);

	return 0;
}
