#include <cstdio>
#include <algorithm>

typedef long long LL;
const int Mod = 1000000007;
const int MN = 100005;

int N, M, A[MN], B[MN];
int K, p[MN], x[MN], y[MN], cx, cy;

inline void Compress(int *a, int &c) {
	static int d[MN];
	for (int i = 1; i <= K; ++i) d[++c] = a[i];
	std::sort(d + 1, d + c + 1), c = std::unique(d + 1, d + c + 1) - d - 1;
	for (int i = 1; i <= K; ++i) a[i] = std::lower_bound(d + 1, d + c + 1, a[i]) - d;
}
inline void Init() {
	scanf("%d%d", &N, &M);
	for (int i = 1; i <= N; ++i) scanf("%d", &A[i]);
	for (int i = 1; i <= M; ++i) scanf("%d", &B[i]);
	int j = 0;
	for (int i = 1; i <= N; ++i) {
		while (j < M && B[j + 1] < A[i]) ++j;
		if (j >= 1 && j < M) {
			++K, p[K] = K;
			x[K] = A[i] - B[j];
			y[K] = B[j + 1] - A[i];
		}
	}
	Compress(x, cx), Compress(y, cy);
	std::sort(p + 1, p + K + 1, [](int a, int b) {
		return x[a] == x[b] ? y[a] > y[b] : x[a] < x[b];
	});
	K = std::unique(p + 1, p + K + 1, [](int a, int b) {
		return x[a] == x[b] && y[a] == y[b];
	}) - p - 1;
}

int bit[MN];
inline void Add(int i, int v) { for (; i <= cy + 1; i += i & -i) bit[i] -= (bit[i] += v) >= Mod ? Mod : 0; }
inline int Qur(int i) { int s = 0; for (; i; i -= i & -i) s -= (s += bit[i]) >= Mod ? Mod : 0; return s; }

int main() {
	Init();
	Add(1, 1);
	for (int i = 1; i <= K; ++i) {
		int pos = y[p[i]];
		Add(pos + 1, Qur(pos));
	}
	printf("%d\n", Qur(cy + 1));
	return 0;
}