#include <bits/stdc++.h>
using iii = int;
using yeee = iii;
const iii DEBUG = -1;
using namespace std;
using namespace chrono;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pll = pair<ll, ll>;
using vb = vector<bool>;
using vvb = vector<vb>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vpll = vector<pll>;
using point = complex<ld>;
template <template <typename...> class Container, typename T, size_t DIMENSION>
struct MultiDimensional {
  using internal = MultiDimensional<Container, T, DIMENSION - 1>;
  using type = Container<typename internal::type>;
  template <typename... Args>
  static type Generate(T def, const size_t size, Args... sizes) {
    return type(size, internal::Generate(def, sizes...));
  }
};
template <template <typename...> class Container, typename T>
struct MultiDimensional<Container, T, 1> {
  using internal = T;
  using type = Container<T>;
  static type Generate(T def, const size_t size) { return type(size, def); }
};
template <typename T, typename... Args>
auto make_vector(T def, Args... sizes) ->
    typename MultiDimensional<std::vector, T, sizeof...(sizes)>::type {
  return MultiDimensional<std::vector, T, sizeof...(sizes)>::Generate(def,
                                                                      sizes...);
}
template <typename T>
T get() {
  T x;
  cin >> x;
  return x;
}
template <typename T1, typename T2>
ostream &operator<<(ostream &out, const pair<T1, T2> &cont) {
  out << "(" << cont.first << ", " << cont.second << ")";
  return out;
}
template <typename T, typename Alloc>
ostream &operator<<(ostream &out, const vector<T, Alloc> &cont) {
  for (ll i = 0; i < (ll)(cont.size()); ++i) out << (i ? " " : "") << cont[i];
  return out;
}
template <typename T, typename Compare, typename Alloc>
ostream &operator<<(ostream &out, const set<T, Compare, Alloc> &cont) {
  out << "{";
  for (const T &x : cont) out << x << ", ";
  out << "}";
  return out;
}
template <typename T, typename Compare, typename Alloc>
ostream &operator<<(ostream &out, const multiset<T, Compare, Alloc> &cont) {
  out << "{";
  for (const T &x : cont) out << x << ", ";
  out << "}";
  return out;
}
template <typename Key, typename T, typename Compare, typename Alloc>
ostream &operator<<(ostream &out, const map<Key, T, Compare, Alloc> &cont) {
  out << "{";
  for (const pair<Key, T> &x : cont)
    out << "(" << x.first << ": " << x.second << "), ";
  out << "}";
  return out;
}
template <typename T>
ostream &operator<<(ostream &out, vector<vector<T>> &cont) {
  for (vector<T> &v : cont) {
    for (ll i = 0; i < (ll)(v.size()); ++i) {
      out << (i ? " " : "") << v[i];
    }
    out << "\n";
  }
  return out;
}
ld get_time() {
  return ld(duration_cast<nanoseconds>(
                high_resolution_clock::now().time_since_epoch())
                .count()) /
         1e9;
}
ll sign(ld x) { return (x > 0) - (x < 0); }
ll pow(ll x, ll exp, ll mod) {
  ll res = 1, y = x;
  while (exp) {
    if (!mod) {
      if (exp & 1) res = res * y;
      y = y * y;
    } else {
      if (exp & 1) res = (res * y) % mod;
      y = (y * y) % mod;
    }
    exp >>= 1;
  }
  return res;
}
ld START_TIME = get_time();
mt19937_64 rand_mt64(chrono::steady_clock::now().time_since_epoch().count());
mt19937 rand_mt(chrono::steady_clock::now().time_since_epoch().count());
const long long INFll = ll(1.1e18) - 1;
const int INFi = ll(1.1e9) - 1;
ll INF;
char newl = '\n';
void main_init(string input_file = "", string output_file = "",
               bool fast_cio = true) {
  if (fast_cio) {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
  }
  srand(unsigned(time(0)));
  if (DEBUG >= 0 && input_file != "") freopen(input_file.c_str(), "r", stdin);
  if (DEBUG >= 0 && output_file != "")
    freopen(output_file.c_str(), "w", stdout);
  if (sizeof(ll) == sizeof(int)) {
    INF = ll(INFi);
  } else {
    INF = ll(INFll);
  }
}
ll solve() {
  ll An, Bn;
  cin >> An >> Bn;
  vll A(An);
  for (ll i = ll(0); i < ll(An); ++i) cin >> A[i];
  sort((A).begin(), (A).end());
  vll B(Bn);
  for (ll i = ll(0); i < ll(Bn); ++i) cin >> B[i];
  sort((B).begin(), (B).end());
  if (A.back() > B[0]) return -1;
  ll res = 0;
  vpll P(An);
  for (ll i = ll(0); i < ll(An); ++i) {
    res += A[i] * Bn;
    P[i] = {A[i], Bn};
  }
  for (ll bi = ll(0); bi < ll(Bn); ++bi) {
    if (P.empty()) return -1;
    if (P.back().first == B[bi]) continue;
    res += B[bi] - P.back().first;
    P.back().second--;
    if (P.back().second == 1) P.pop_back();
  }
  return res;
}
yeee main() {
  main_init();
  cout << solve() << endl;
}
