/*

                   _ooOoo_
                  o8888888o
                  88" . "88
                  (| -_- |)
                  O\  =  /O
               ____/`---'\____
             .'  \\|     |//  `.
            /  \\|||  :  |||//  \
           /  _||||| -:- |||||-  \
           |   | \\\  -  /// |   |
           | \_|  ''\---/''  |   |
           \  .-\__  `-`  ___/-. /
         ___`. .'  /--.--\  `. . __
      ."" '<  `.___\_<|>_/___.'  >'"".
     | | :  `- \`.;`\ _ /`;.`/ - ` : | |
     \  \ `-.   \_ __\ /__ _/   .-` /  /
======`-.____`-.___\_____/___.-`____.-'======
                   `=---='
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
                    prayer
*/

// g++ -std=c++11 a.cpp
#include<iostream>
#include<vector>
#include<string>
#include<algorithm>	
#include<map>
#include<set>
#include<unordered_map>
#include<utility>
#include<cmath>
#include<random>
#include<cstring>
#include<queue>
#include<stack>
#include<bitset>
#include<cstdio>
#include<sstream>
#include<iomanip>
#include<assert.h>
#include<typeinfo>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define FOR(i,a) for(auto i:a)
#define pb push_back
#define all(in) in.begin(),in.end()
#define shosu(x) fixed<<setprecision(x)
#define show1d(v) rep(_,v.size())cout<<" "<<v[_];cout<<endl;
#define show2d(v) rep(__,v.size()){rep(_,v[__].size())cout<<" "<<v[__][_];cout<<endl;}
using namespace std;
//kaewasuretyuui
typedef long long ll;
#define int ll
typedef int Def;
typedef pair<Def,Def> pii;
typedef vector<Def> vi;
typedef vector<vi> vvi;
typedef vector<pii> vp;
typedef vector<vp> vvp;
typedef vector<string> vs;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef pair<Def,pii> pip;
typedef vector<pip>vip;
// #define mt make_tuple
// typedef tuple<int,int,int> tp;
// typedef vector<tp> vt;
template<typename A,typename B>bool cmin(A &a,const B &b){return a>b?(a=b,true):false;}
template<typename A,typename B>bool cmax(A &a,const B &b){return a<b?(a=b,true):false;}
//template<class C>constexpr int size(const C &c){return (int)c.size();}
//template<class T,size_t N> constexpr int size(const T (&xs)[N])noexcept{return (int)N;}
const double PI=acos(-1);
const double EPS=1e-9;
Def inf = sizeof(Def) == sizeof(long long) ? 2e18 : 1e9+10;
int dx[]={0,1,0,-1};
int dy[]={1,0,-1,0};

int MOD=1000000007;
class BIT{
	public:
	//[1,i]
	int n;
	vi bit;
//	int bit[MAZ_N+1];
	BIT(int size){
		n=size;
		bit=vi(n+1);
	}
	Def query(int i){//sum
		Def s=0;
		while(i>0){
			(s+=bit[i])%=MOD;
			i-=i&-i;
		}
		return s;
	}
	void add(int i,Def x){
		while(i<=n){
			(bit[i]+=x)%=MOD;
			i+=i&-i;
		}
	}
};
signed main(){
	int n,m;
	cin>>n>>m;
	vi ro(n);
	rep(i,n)cin>>ro[i];
	vi de(m);
	rep(i,m)cin>>de[i];
	de.pb(inf);
	vvi in;
	rep(i,n){
		int it=lower_bound(all(de),ro[i])-de.begin();
		if(it==0||it==m)continue;
		in.pb({ro[i]-de[it-1],de[it]-ro[i]});
	}
	vi y;
	rep(i,in.size())y.pb(in[i][1]);
	sort(all(y));
	y.erase(unique(all(y)),y.end());
	rep(i,in.size())in[i][1]=lower_bound(all(y),in[i][1])-y.begin()+1;

	rep(i,in.size())in[i][1]*=-1;
	sort(all(in));
	BIT bit(100010);
	bit.add(1,1);
	rep(i,in.size())if(i==0||i&&in[i]!=in[i-1]){
		int x=bit.query(-in[i][1]);
		bit.add(-in[i][1]+1,x);
	}
	
	cout<<bit.query(100009)<<endl;
}















Measured memory_bytes: 9708