import std.stdio, std.algorithm, std.range, std.conv, std.string, std.math, std.container, std.typecons;
import core.stdc.stdio;
// foreach, foreach_reverse, writeln
alias P = Tuple!(int,int);

void main() {
	const int MOD = 1_000_000_007;
	int n, m;
	scanf("%d%d", &n, &m);
	int[] x = new int[n];
	int[] raw = new int[m];
	foreach (i; 0..n) scanf("%d", &x[i]);
	foreach (i; 0..m) scanf("%d", &raw[i]);
	auto y = raw.assumeSorted;

	P[] p;
	foreach (i; 0..n) {
		int r = y.lowerBound(x[i]).length.to!int;
		if (r == m || r == 0) continue;
		p ~= P(x[i]-y[r-1], x[i]-y[r]);
	}
	p = p.sort.uniq.array;
	n = p.length.to!int;
	int[] a;
	foreach (i; 0..n) {
		a ~= p[i][1]*-1;
	}
	int[] ca = a.dup;
	ca = ca.sort.uniq.array;
	foreach (i; 0..n) {
		a[i] = ca.assumeSorted.lowerBound(a[i]).length.to!int+1;
	}

	class BIT {
		int[] data;
		this(int n) {
			data = new int[n+1];
		}
		BIT dup() {
			BIT ret = new BIT(to!int(data.length));
			ret.data = data.dup;
			return ret;
		}
		void add(int i, int x=1) {
			i++;
			while (i < data.length) {
				(data[i] += x) %= MOD;
				i += i&-i;
			}
		}
		int sum(int i) {
			int ret = 0;
			i++;
			while (i) {
				(ret += data[i]) %= MOD;
				i -= i&-i;
			}
			return ret;
		}
	}

	int ans = 1;
	BIT b = new BIT(n+1);
	b.add(0,1);
	foreach (i; 0..n) {
		int cur = b.sum(a[i]-1);
		(ans += cur) %= MOD;
		b.add(a[i], cur);
	}
	writeln(ans);
}