Problem: There are N robots and M exits on a number line. The N + M coordinates of these are all integers and all distinct. For each i (1 \leq i \leq N), the coordinate of the i-th robot from the left is x_i. Also, for each j (1 \leq j \leq M), the coordinate of the j-th exit from the left is y_j.

Snuke can repeatedly perform the following two kinds of operations in any order to move all the robots simultaneously:

* Increment the coordinates of all the robots on the number line by 1.
* Decrement the coordinates of all the robots on the number line by 1.



Each robot will disappear from the number line when its position coincides with that of an exit, going through that exit. Snuke will continue performing operations until all the robots disappear.

When all the robots disappear, how many combinations of exits can be used by the robots? Find the count modulo 10^9 + 7. Here, two combinations of exits are considered different when there is a robot that used different exits in those two combinations.

Constraints

* 1 \leq N, M \leq 10^5
* 1 \leq x_1 < x_2 < ... < x_N \leq 10^9
* 1 \leq y_1 < y_2 < ... < y_M \leq 10^9
* All given coordinates are integers.
* All given coordinates are distinct.

Input

Input is given from Standard Input in the following format:


N M
x_1 x_2 ... x_N
y_1 y_2 ... y_M


Output

Print the number of the combinations of exits that can be used by the robots when all the robots disappear, modulo 10^9 + 7.

Examples

Input

2 2
2 3
1 4


Output

3


Input

3 4
2 5 10
1 3 7 13


Output

8


Input

4 1
1 2 4 5
3


Output

1


Input

4 5
2 5 7 11
1 3 6 9 13


Output

6


Input

10 10
4 13 15 18 19 20 21 22 25 27
1 5 11 12 14 16 23 26 29 30


Output

22

Solution (in CPP):

Solution:
#include<stdio.h>
#include<algorithm>
using namespace std;
#define fo(i,a,b) for(int i=a;i<=b;i++)
#define fd(i,a,b) for(int i=a;i>=b;i--)
int n,m,ro[110000],ex[110000],now,x[110000],y[110000],lasy,t,r[110000],yt,f[110000],ans,g[110000],lx;
const int p=1e9+7;
inline bool cmp1(const int a,const int b){
	return y[a]<y[b];
}
inline bool cmp2(const int a,const int b){
	if (x[a]==x[b]) return y[a]<y[b];//!!!!
	return x[a]<x[b];
}
inline void add(int x,int v){
	while (x<=yt){
		f[x]+=v;
		if (f[x]>=p) f[x]-=p;
		x+=x&(-x);
	}
}
inline int ask(int x){
	int ans=0;
	while (x){
		ans+=f[x];
		if (ans>=p) ans-=p;
		x-=x&(-x);//!!!
	}
	return ans;
}
int main(){
	scanf("%d%d",&n,&m);
	fo(i,1,n) scanf("%d",&ro[i]);
	fo(i,1,m) scanf("%d",&ex[i]);
	now=2;
	fo(i,1,n){
		while (ro[i]>ex[now]&&now<m) now++;
		if (ex[now-1]<ro[i]&&ro[i]<ex[now]){
			x[++t]=ro[i]-ex[now-1];
			y[t]=ex[now]-ro[i];
		}
	}
	//fo(i,1,t) printf("%d %d\n",x[i],y[i]);
	fo(i,1,t) r[i]=i;
	sort(r+1,r+t+1,cmp1);
	yt=1;lasy=0;
	fo(i,1,t)
		if (y[r[i]]>lasy){
			lasy=y[r[i]];
			y[r[i]]=++yt;
		}else y[r[i]]=yt;
	sort(r+1,r+t+1,cmp2);
	lx=1;
	add(1,1);//!!!
	ans=1;//!!!
	fo(i,1,t){
		if (x[r[i]]>x[r[lx]]){
			fo(j,lx,i-1) add(y[r[j]],g[j]);//y[r[i]]
			lx=i;
		}
		if (x[r[i]]==x[r[i-1]]&&y[r[i]]==y[r[i-1]]) continue;
		g[i]=ask(y[r[i]]-1);
		ans+=g[i];
		if (ans>=p) ans-=p;
	}
	printf("%d\n",ans);
	return 0;
}