#include<iostream>
#include<algorithm>
#include<vector>
#include<queue>
#define lol(i,n) for(int i=0;i<n;i++)
#define mod 1000000007
typedef long long ll;

using namespace std;
#define N (1<<17)
class RSQ{
private:
    ll dat[2*N];
    ll dfs(int l,int r,int a,int b,int k){
	if(l<=a&&b<=r)return dat[k];
	if(b<=l||r<=a)return 0;
	ll vl=dfs(l,r,a,(a+b)/2,k*2+1);
	ll vr=dfs(l,r,(a+b)/2,b,k*2+2);
	return (vl+vr)%mod;
    }
public:
    void Init(){
	lol(i,2*N)dat[i]=0;
    }
    void Upd(int i,ll x){
	i+=N-1,dat[i]=x%mod;
	while(i>0){
	    i=(i-1)/2;
	    dat[i]=(dat[i*2+1]+dat[i*2+2])%mod;
	}
    }
    void Add(int i,ll x){
	Upd(i,(Sum(i,i)+x)%mod);
    }
    ll Sum(int l,int r){
	return dfs(l,r+1,0,N,0)%mod;
    }
};
ll n,m,x[N],y[N];
vector<pair<ll,ll> >v;
void Zaats(){
    vector<ll> w;
    lol(i,v.size())v[i].second*=-1;
    for(auto i:v)w.push_back(i.second);
    sort(w.begin(),w.end());
    lol(i,v.size()){
	v[i].second=lower_bound(w.begin(),w.end(),v[i].second)-w.begin();
	v[i].second++;
    }
}
int main(){
    cin>>n>>m;
    lol(i,n)cin>>x[i];
    lol(i,m)cin>>y[i];
    lol(i,n){
	if(x[i]<y[0]||x[i]>y[m-1])continue;
	auto it=lower_bound(y,y+m,x[i]);
	ll r=*it-x[i];
	it--;
	ll l=x[i]-*it;
	v.push_back(make_pair(l,-r));
    }
    sort(v.begin(),v.end());
    Zaats();
    RSQ seg;seg.Init();
    seg.Add(0,1);
    pair<ll,ll> bef=make_pair(-1,-1);
    lol(i,v.size()){
	if(v[i]==bef)continue;
	bef=v[i];
	ll t=v[i].second;
	seg.Add(t,seg.Sum(0,t-1));
    }
    cout<<seg.Sum(0,N-1)<<endl;
    return 0;
}
