#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
unsigned long long dp[100010];
unsigned long long dp2[100010];
int main() {
  unsigned long long n, m;
  cin >> n >> m;
  vector<unsigned long long> lx(n);
  vector<unsigned long long> ly(m);
  for (unsigned long long& x : lx) cin >> x;
  for (unsigned long long& y : ly) cin >> y;
  unsigned long long bx = lx[0];
  unsigned long long h = 1;
  for (unsigned long long i = 1; i < n; ++i) {
    unsigned long long x = lx[i];
    unsigned long long s = (x - bx);
    dp[i + 1] = 2 * dp[i] - dp[i - 1] + i * s % MOD;
    dp[i + 1] %= MOD;
    bx = x;
  }
  unsigned long long w = dp[n];
  unsigned long long by = ly[0];
  for (unsigned long long i = 1; i < m; ++i) {
    unsigned long long y = ly[i];
    unsigned long long s = (y - by) * w % MOD;
    dp2[i + 1] = 2 * dp2[i] - dp2[i - 1] + i * s % MOD;
    dp2[i + 1] %= MOD;
    by = y;
  }
  cout << dp2[m] << endl;
}
