#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N=100005;
const ll ms=1e9+7;
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*10+ch-'0'; ch=getchar();}
	return x*f;
}
struct Nod{
	int x,y;
}a[N];
bool cmp(Nod a,Nod b){
	if (a.x==b.x) return a.y>b.y;
	else return a.x<b.x;
}
int b[N],tmpx[N],tmpy[N],tot,c1,c2;
queue<int>q;
struct BIT{
	int s[N];
	int lowbit(int x){
		return x&(-x);
	}
	void modify(int x,int y){
		for (int i=x;i<=c2;i+=lowbit(i))
		(s[i]+=y)%=ms;
	}
	int query(int x){
		int ans=0;
		for (int i=x;i;i-=lowbit(i))
		ans=(ans+s[i])%ms;
		return ans;
	}
}tree;
int main(){
	int n=read(),m=read();
	for (int i=1;i<=n;i++){
		int x=read(); q.push(x);
	}
	for (int i=1;i<=m;i++) b[i]=read(); tot=0,c1=0,c2=0;
	while (!q.empty()){
		int k=q.front(); q.pop(); int pos=lower_bound(b+1,b+1+m,k)-b;
		if (k<=b[1]||k>=b[m]||k==b[pos]) continue;
		a[++tot].x=b[pos]-k,a[tot].y=k-b[pos-1];
		tmpx[++c1]=a[tot].x,tmpy[++c2]=a[tot].y;
	}
	sort(tmpx+1,tmpx+1+c1); sort(tmpy+1,tmpy+1+c2);
	c1=unique(tmpx+1,tmpx+1+c1)-tmpx-1; c2=unique(tmpy+1,tmpy+c2+1)-tmpy-1;
	for (int i=1;i<=tot;i++){
		a[i].x=lower_bound(tmpx+1,tmpx+1+c1,a[i].x)-tmpx;
		a[i].y=lower_bound(tmpy+1,tmpy+1+c2,a[i].y)-tmpy;
	}
	sort(a+1,a+1+tot,cmp);
	ll ans=1;
	for (int i=1;i<=tot;i++){
		if (a[i].x==a[i-1].x&&a[i].y==a[i-1].y) continue;
		int x=(tree.query(a[i].y-1)+1)%ms;
		ans=(ans+x)%ms;
		tree.modify(a[i].y,x);
	}
	printf("%lld\n",ans);
	return 0;
}