#include <bits/stdc++.h>
const int N = 2e6, inf = 1e9 + 7;
using namespace std;
int n, m, a[N], b[N];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  for (int i = 1; i <= m; ++i) scanf("%d", &b[i]);
  sort(a + 1, a + n + 1);
  sort(b + 1, b + m + 1);
  if (a[n] > b[1]) {
    puts("-1");
    return 0;
  }
  long long ans = 0;
  if (a[n] == b[1]) {
    for (int i = 1; i <= m; ++i) ans += b[i];
    for (int i = 1; i <= n - 1; ++i) ans += (long long)a[i] * m;
  } else {
    if (n == 1) {
      puts("-1");
      return 0;
    }
    for (int i = 1; i <= m; ++i) ans += b[i];
    for (int i = 1; i <= n - 1; ++i) ans += (long long)a[i] * m;
    ans += a[n] - a[n - 1];
  }
  printf("%lld\n", ans);
  return 0;
}
