#include <cassert>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <algorithm>
#include <vector>
#include <map>
#include <queue>
#include <set>
#include <iostream>
#define REP(i, n) for(int i = 0; i < (int)(n); ++i)
using namespace std;

template<typename T>
struct BIT {
  vector<T> data;
  BIT() {}
  BIT(int n) : data(n+1, 0) {}
  void init(int n) { data.assign(n+1, 0); }
  T sum(int ed) const {
    for(T res(0); ; ed &= ed-1) if(ed) res += data[ed]; else return res;
  }
  void add(int i, const T& x) {
    for(++i; i < (int)data.size(); i += i&-i) data[i] += x;
  }
};

long long inv(int a, int p) { return a==1 ? 1 : (1-p*inv(p%a,a))/a+p; }
static const int MODVAL = 1000000007;
struct mint {
  int val;
  mint():val(0){}
  mint(int x):val(x%MODVAL) {}
  mint(size_t x):val(x%MODVAL) {}
  mint(long long x):val(x%MODVAL) {}
  mint& operator+=(mint y) { val+=y.val; if(val>=MODVAL) val-=MODVAL; return *this; }
  mint& operator-=(mint y) { val-=y.val; if(val<0) val+= MODVAL; return *this; }
  mint& operator*=(mint y) { val=(val*(long long)y.val)%MODVAL; return *this; }
  mint& operator/=(mint y) { val=(val*inv(y.val,MODVAL))%MODVAL; return *this; }
};
inline mint operator+(mint x, mint y) { return x+=y; }
inline mint operator-(mint x, mint y) { return x-=y; }
inline mint operator*(mint x, mint y) { return x*=y; }
inline mint operator/(mint x, mint y) { return x/=y; }
mint POW(mint x, long long n) { mint r(1); for(;n;x*=x,n>>=1) if(n&1) r*=x; return r; }
mint FAC(int n) { static vector<mint> FAC_(1,1);
  while(int(FAC_.size())<=n) FAC_.push_back(FAC_.back()*FAC_.size()); return FAC_[n]; }
inline mint CMB(int n, int k) { return k<0||n<k ? 0 : FAC(n) / (FAC(k) * FAC(n-k)); }
inline ostream& operator<<(ostream& os, mint a) { return os << a.val; }

struct P {
  int x, y;
};
bool operator<(const P& p1, const P& p2) {
  if(p1.y != p2.y) return p1.y < p2.y;
  return p1.x > p2.x;
}
bool operator==(const P& p1, const P& p2) {
  return p1.x == p2.x && p1.y == p2.y;
}

int robots[100000+10];
int exits[100000+10];
int idx2d[200000+10];
map<int,int> d2idx;
P ps[100000+10];

template<typename T>
class Compression {
private:
  map<T,int> orig2idx;
  vector<T> idx2orig;
public:
  Compression(const vector<T>& values): orig2idx(), idx2orig(values) {
    sort(idx2orig.begin(), idx2orig.end());
    idx2orig.erase(unique(idx2orig.begin(), idx2orig.end()), idx2orig.end());
    REP(i, idx2orig.size()) {
      orig2idx[idx2orig[i]] = i;
    }
  }
  int toIndex(const T& orig) const {
    assert(orig2idx.count(orig));
    return orig2idx.at(orig);
  }
  int fromIndex(int idx) const {
    assert(0 <= idx && idx < (int)idx2orig.size());
    return idx2orig[idx];
  }
  int size(void) const {
    return idx2orig.size();
  }
};

int main(void) {
  int n, m;
  scanf("%d%d", &n, &m);
  REP(i, n) {
    scanf("%d", &robots[i]);
  }
  REP(i, m) {
    scanf("%d", &exits[i]);
  }

  int nP = 0;
  REP(i, n) {
    int x = robots[i];
    int j = lower_bound(exits, exits+m, x) - exits;
    if(j == 0 || j == m) {
      // 一意
    } else {
      ps[nP++] = (P){x-exits[j-1], exits[j]-x};
    }
  }
  if(nP == 0) {
    puts("1");
    return 0;
  }
  sort(ps, ps + nP);
  nP = unique(ps, ps + nP) - ps;

  vector<int> xs;
  REP(i, nP) {
    xs.push_back(ps[i].x);
  }
  Compression<int> c(xs);
  REP(i, nP) {
    ps[i].x = c.toIndex(ps[i].x);
  }

  BIT<mint> bit(c.size()+1);
  bit.add(0, 1);
  REP(i, nP) {
    const P& p = ps[i];
    mint t = bit.sum(p.x+1);
    bit.add(p.x+1, t);
  }
  cout << bit.sum(c.size()+1) << endl;
  return 0;
}


Measured memory_bytes: 7160