#include <bits/stdc++.h>
using namespace std;
inline signed wait() { return 0; }
inline void dout(const char *arg, ...) {}
template <typename T>
inline void SWAP(T &a, T &b) {
  T t = a;
  a = b;
  b = t;
}
inline void CSWAP(char *&a, char *&b) {
  char *t = a;
  a = b;
  b = t;
}
void CombSort(int N, int *ar, int order_ascending = 1) {
  if (N <= 1) return;
  int h = int(N / 1.3);
  int flag;
  int i;
  while (true) {
    flag = 0;
    for (i = 0; i + h < N; ++i) {
      if ((order_ascending && ar[i] > ar[i + h]) ||
          (!order_ascending && ar[i] < ar[i + h])) {
        swap<int>(ar[i], ar[i + h]);
        flag = 1;
      }
    }
    if (h == 1 && !flag) break;
    if (h == 9 || h == 10) h = 11;
    if (h > 1) h = int(h / 1.3);
  }
}
void CombSort(int N, long long int *ar, int order_ascending = 1) {
  if (N <= 1) return;
  int h = int(N / 1.3);
  int flag;
  int i;
  while (true) {
    flag = 0;
    for (i = 0; i + h < N; ++i) {
      if ((order_ascending && ar[i] > ar[i + h]) ||
          (!order_ascending && ar[i] < ar[i + h])) {
        swap<long long int>(ar[i], ar[i + h]);
        flag = 1;
      }
    }
    if (h == 1 && !flag) break;
    if (h == 9 || h == 10) h = 11;
    if (h > 1) h = int(h / 1.3);
  }
}
int EuclideanAlgorithm(int N, int *ar) {
  for (int n = 0; n < N - 1; ++n) {
    while (true) {
      if (ar[n] % ar[n + 1] == 0 || ar[n + 1] % ar[n] == 0) {
        ar[n + 1] = ar[n] < ar[n + 1] ? ar[n] : ar[n + 1];
        break;
      }
      if (ar[n] > ar[n + 1]) {
        ar[n] %= ar[n + 1];
      } else {
        ar[n + 1] %= ar[n];
      }
    }
  }
  return ar[N - 1];
}
template <typename T>
void CombSort(int N, T *ar, int order_ascending = 1) {
  if (N <= 1) return;
  int i, flag;
  int h = int(N / 1.3);
  while (true) {
    flag = 0;
    for (i = 0; i + h < N; ++i) {
      if (order_ascending && ar[i].SortValue > ar[i + h].SortValue ||
          !order_ascending && ar[i].SortValue < ar[i + h].SortValue) {
        swap<T>(ar[i], ar[i + h]);
        flag = 1;
      }
    }
    if (h > 1) {
      h = int(h / 1.3);
      if (h == 9 || h == 10) h = 11;
    } else {
      if (!flag) break;
    }
  }
}
struct UnionFind {
  vector<int> par;
  UnionFind(int N) : par(N) {
    for (int i = 0; i < N; i++) par[i] = i;
  }
  int root(int x) {
    if (par[x] == x) return x;
    return par[x] = root(par[x]);
  }
  void unite(int x, int y) {
    int rx = root(x);
    int ry = root(y);
    if (rx == ry) return;
    par[rx] = ry;
  }
  bool same(int x, int y) {
    int rx = root(x);
    int ry = root(y);
    return rx == ry;
  }
};
void Replace(char *c, int len, char before, char after) {
  for (int i = 0; i < len; ++i) {
    if (c[i] == before) c[i] = after;
  }
}
void Replace(char *c, char before, char after) {
  int len = strlen(c);
  Replace(c, len, before, after);
}
class csNode {
 public:
  csNode() {}
};
class csStack {
 public:
  csStack() { num = 0; }
  void alloc(int size) { param = new int[size]; }
  void sort(int order = 1) {
    if (num > 1) CombSort(num, param, order);
  }
  int num;
  int *param;
  void push(int p) { param[num++] = p; }
};
class csPosition {
 public:
  csPosition() { x = y = 0; }
  int x, y;
};
template <typename T>
class csPos {
 public:
  csPos() { x = y = 0; }
  T x, y;
};
char s[200010];
long long int x[100010], y[100010];
long long int coef[100010];
signed main() {
  long long int n, m;
  scanf("%lld %lld", &n, &m);
  for (int i = 0; i < n; ++i) scanf("%lld", &x[i]);
  for (int i = 0; i < n; ++i) scanf("%lld", &y[i]);
  long long int i;
  long long int p, u, r;
  for (i = 0; i < n / 2; ++i) {
    p = i + 1;
    u = p * (p + 1);
    if (n % 2 == 0 && i == n / 2 - 1) {
      u -= p;
    } else {
      u += p * (n - 1 - 2 * p);
    }
    coef[n - i - 2] = coef[i] = u;
  }
  long long int L = 0;
  for (i = 0; i < n - 1; ++i) {
    L += coef[i] * (x[i + 1] - x[i]);
    L %= 1000000007;
  }
  for (i = 0; i < m / 2; ++i) {
    p = i + 1;
    u = p * (p + 1);
    if (m % 2 == 0 && i == m / 2 - 1) {
      u -= p;
    } else {
      u += p * (m - 1 - 2 * p);
    }
    coef[m - i - 2] = coef[i] = u;
  }
  long long int S = 0;
  for (i = 0; i < m - 1; ++i) {
    S += L * coef[i] * (y[i + 1] - y[i]);
    S %= 1000000007;
  }
  cout << S << endl;
  ;
  return wait();
}
