// Original C++ solution (slower):
#include <algorithm>

#include <iostream>

#include <cstring>

#include <cstdlib>

#include <cstdio>

#include <vector>

#define itn int

#define reaD read

#define N 100005

#define mod 1000000007

#define int long long

using namespace std;



int n, m, cnt, a[N], b[N], d[N], t[N];  

struct node { int x, y; bool operator < (const node &p) const { return x < p.x || (x == p.x && y > p.y); }

	bool operator==(const node &b)const{return x==b.x && y==b.y;}} c[N]; 

long long ans = 1; 



inline int read()

{

	int x = 0, w = 1; char c = getchar();

	while(c < '0' || c > '9') { if (c == '-') w = -1; c = getchar(); }

	while(c >= '0' && c <= '9') { x = x * 10 + c - '0'; c = getchar(); }

	return x * w;

}



int lowbit(int x) { return x & (-x); }



void add(int x, long long y) { for(int i = x; i <= cnt; i += lowbit(i)) t[i] = (t[i] + y) % mod; }



long long query(int x) { long long res = 0; for(int i = x; i; i -= lowbit(i)) res = (res + t[i]) % mod; return res; }



signed main()

{

	n = read(); m = read();

	for(int i = 1; i <= n; i++) a[i] = read();

	for(int j = 1; j <= m; j++) b[j] = read();

	for(int i = 1; i <= n; i++)

		if(a[i] > b[1] && a[i] < b[m])

		{

			int pos = lower_bound(b + 1, b + m + 1, a[i]) - b;

			if(b[pos] == a[i]) continue;

			c[++cnt] = (node) { a[i] - b[pos - 1], b[pos] - a[i] };

			d[cnt] = b[pos] - a[i]; 

		}

	sort(d + 1, d + cnt + 1); n = unique(d + 1, d + cnt + 1) - d - 1;

	for(int i = 1; i <= cnt; i++) c[i].y = lower_bound(d + 1, d + n + 1, c[i].y) - d;

	sort(c + 1, c + cnt + 1); cnt=unique(c+1,c+cnt+1)-c-1;

	for(int i = 1; i <= cnt; i++)

	{

		long long t = query(c[i].y - 1) + 1;

		ans = (ans + t) % mod; add(c[i].y, t); 

	}

	printf("%lld\n", ans % mod); 

	return 0;

}

// Optimized solution to the same problem (faster):
#include <cstdio>

#include <algorithm>

#include <vector>

#define file(x) freopen(#x".in", "r", stdin), freopen(#x".out", "w", stdout)



inline int read()

{

	int data = 0, w = 1; char ch = getchar();

	while (ch != '-' && (ch < '0' || ch > '9')) ch = getchar();

	if (ch == '-') w = -1, ch = getchar();

	while (ch >= '0' && ch <= '9') data = data * 10 + (ch ^ 48), ch = getchar();

	return data * w;

}



const int maxn(100010), Mod(1e9 + 7);

int n, m, A[maxn], B[maxn], S[maxn], c[maxn], f[maxn], tot;

struct node { int x, y; } P[maxn];

inline bool operator == (const node &lhs, const node &rhs)

	{ return lhs.x == rhs.x && lhs.y == rhs.y; }

void Add(int x, int v) { for (; x <= tot; x += x & -x) c[x] = (c[x] + v) % Mod; }

int Sum(int x) { int ans = 0; for (; x; x -= x & -x) ans = (ans + c[x]) % Mod; return ans; }



int main()

{

	n = read(), m = read();

	for (int i = 1; i <= n; i++) A[i] = read();

	for (int i = 1; i <= m; i++) B[i] = read();

	P[tot = 1] = (node) {0, 0};

	for (int i = 1, j; i <= n; i++)

	{

		j = std::upper_bound(B + 1, B + m + 1, A[i]) - B;

		if (j > 1 && j <= m) P[++tot] = (node) {A[i] - B[j - 1], B[j] - A[i]};

	}

	P[n = ++tot] = (node) {(int)1e9, (int)1e9}, tot = 0;

	for (int i = 1; i <= n; i++) S[i] = P[i].y;

	std::sort(S + 1, S + n + 1), tot = std::unique(S + 1, S + n + 1) - S - 1;

	for (int i = 1; i <= n; i++)

		P[i].y = std::lower_bound(S + 1, S + tot + 1, P[i].y) - S;

	std::sort(P + 1, P + n + 1, [] (const node &lhs, const node &rhs)

			{ return lhs.x != rhs.x ? lhs.x < rhs.x : lhs.y < rhs.y; });

	n = std::unique(P + 1, P + n + 1) - P - 1;

	Add(P[1].y, 1);

	for (int i = 2, j; i <= n; i = j)

	{

		for (j = i; j <= n && P[j].x == P[i].x; j++);

		for (int k = i; k < j; k++) f[k] = Sum(P[k].y - 1);

		for (int k = i; k < j; k++) Add(P[k].y, f[k]);

	}

	printf("%d\n", f[n]);

	return 0;

}

//

// Fastest known solution for this problem: