#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
template <class c>
struct rge {
  c h, n;
};
template <class c>
rge<c> range(c h, c n) {
  return rge<c>{h, n};
}
template <class c, class F>
struct rgm {
  c h, n;
  F f;
};
template <class c, class F>
rgm<c, F> map_range(c b, c e, F f) {
  return rgm<c, F>{b, e, f};
}
template <class c, class F>
rgm<typename c::const_iterator, F> map_range(const c &x, F f) {
  return map_range(x.begin(), x.end(), f);
}
template <class c, class F>
struct umm {
  c m;
  F f;
  bool r;
};
template <class c, class F>
umm<c, F> mask_iter(c a, F f, bool r = false) {
  return umm<c, F>{a, f, r};
}
template <class c>
auto dud(c *r) -> decltype(cerr << *r);
template <class c>
char dud(...);
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using pii = pair<int, int>;
using vpii = vector<pii>;
using unt = unsigned int;
int popc(unt a) { return __builtin_popcount(a); }
int popc(int a) { return __builtin_popcount(a); }
int popc(ll a) { return __builtin_popcountll(a); }
int popc(ull a) { return __builtin_popcountll(a); }
int ctz(unt a) { return __builtin_ctz(a); }
int ctz(int a) { return __builtin_ctz(a); }
int ctz(ll a) { return __builtin_ctzll(a); }
int ctz(ull a) { return __builtin_ctzll(a); }
int clz(unt a) { return __builtin_clz(a); }
int clz(int a) { return __builtin_clz(a); }
int clz(ll a) { return __builtin_clzll(a); }
int clz(ull a) { return __builtin_clzll(a); }
struct muu {
  template <class c>
  muu &operator<<(const c &) {
    return *this;
  }
};
template <class c>
void factor(muu &d, c x) {
  if (x <= 1 && x + 1 >= 0) {
    d << x;
    return;
  }
  d << x << "=";
  if (x < 0) {
    d << "-";
    x = -x;
  }
  int q = 0;
  for (c p = 2; p * p < x; ++p) {
    int e = 0;
    while (x % p == 0) {
      e++;
      x /= p;
    }
    if (e) d << "*" + !q++ << p;
    if (e > 1) d << "^" << e;
  }
  if (x > 1) d << "*" + !q++ << x;
}
template <class c>
void mini(c &a, c b) {
  if (a > b) a = b;
}
template <class c>
void maxi(c &a, c b) {
  if (a < b) a = b;
}
template <class c, class d, class e, class f>
auto operator+(pair<c, d> a, pair<e, f> b)
    -> decltype(make_pair(a.first + b.first, a.second + b.second)) {
  return {a.first + b.first, a.second + b.second};
}
template <class c, class d, class e,
          class = typename enable_if<!is_same<c, muu>::value>::type>
auto operator+(c a, pair<d, e> b)
    -> decltype(make_pair(a + b.first, a + b.second)) {
  return {a + b.first, a + b.second};
}
template <class c, class d, class e>
auto operator+(pair<c, d> a, e b)
    -> decltype(make_pair(a.first + b, a.second + b)) {
  return {a.first + b, a.second + b};
}
template <class c, class d, class e>
void operator+=(pair<c, d> &a, e b) {
  a.first += b;
  a.second += b;
}
template <class c, class d, class e, class f>
void operator+=(pair<c, d> &a, pair<e, f> b) {
  a.first += b.first;
  a.second += b.second;
}
template <class c, class d, class e, class f>
auto operator-(pair<c, d> a, pair<e, f> b)
    -> decltype(make_pair(a.first - b.first, a.second - b.second)) {
  return {a.first - b.first, a.second - b.second};
}
template <class c, class d, class e,
          class = typename enable_if<!is_same<c, muu>::value>::type>
auto operator-(c a, pair<d, e> b)
    -> decltype(make_pair(a - b.first, a - b.second)) {
  return {a - b.first, a - b.second};
}
template <class c, class d, class e>
auto operator-(pair<c, d> a, e b)
    -> decltype(make_pair(a.first - b, a.second - b)) {
  return {a.first - b, a.second - b};
}
template <class c, class d, class e>
void operator-=(pair<c, d> &a, e b) {
  a.first -= b;
  a.second -= b;
}
template <class c, class d, class e, class f>
void operator-=(pair<c, d> &a, pair<e, f> b) {
  a.first -= b.first;
  a.second -= b.second;
}
template <class c, class d, class e, class f>
auto operator*(pair<c, d> a, pair<e, f> b)
    -> decltype(make_pair(a.first * b.first, a.second *b.second)) {
  return {a.first * b.first, a.second * b.second};
}
template <class c, class d, class e,
          class = typename enable_if<!is_same<c, muu>::value>::type>
auto operator*(c a, pair<d, e> b)
    -> decltype(make_pair(a * b.first, a *b.second)) {
  return {a * b.first, a * b.second};
}
template <class c, class d, class e>
auto operator*(pair<c, d> a, e b)
    -> decltype(make_pair(a.first * b, a.second *b)) {
  return {a.first * b, a.second * b};
}
template <class c, class d, class e>
void operator*=(pair<c, d> &a, e b) {
  a.first *= b;
  a.second *= b;
}
template <class c, class d, class e, class f>
void operator*=(pair<c, d> &a, pair<e, f> b) {
  a.first *= b.first;
  a.second *= b.second;
}
template <class c, class d, class e, class f>
auto operator/(pair<c, d> a, pair<e, f> b)
    -> decltype(make_pair(a.first / b.first, a.second / b.second)) {
  return {a.first / b.first, a.second / b.second};
}
template <class c, class d, class e,
          class = typename enable_if<!is_same<c, muu>::value>::type>
auto operator/(c a, pair<d, e> b)
    -> decltype(make_pair(a / b.first, a / b.second)) {
  return {a / b.first, a / b.second};
}
template <class c, class d, class e>
auto operator/(pair<c, d> a, e b)
    -> decltype(make_pair(a.first / b, a.second / b)) {
  return {a.first / b, a.second / b};
}
template <class c, class d, class e>
void operator/=(pair<c, d> &a, e b) {
  a.first /= b;
  a.second /= b;
}
template <class c, class d, class e, class f>
void operator/=(pair<c, d> &a, pair<e, f> b) {
  a.first /= b.first;
  a.second /= b.second;
}
template <class c, class d, class e, class f>
auto operator%(pair<c, d> a, pair<e, f> b)
    -> decltype(make_pair(a.first % b.first, a.second % b.second)) {
  return {a.first % b.first, a.second % b.second};
}
template <class c, class d, class e,
          class = typename enable_if<!is_same<c, muu>::value>::type>
auto operator%(c a, pair<d, e> b)
    -> decltype(make_pair(a % b.first, a % b.second)) {
  return {a % b.first, a % b.second};
}
template <class c, class d, class e>
auto operator%(pair<c, d> a, e b)
    -> decltype(make_pair(a.first % b, a.second % b)) {
  return {a.first % b, a.second % b};
}
template <class c, class d, class e>
void operator%=(pair<c, d> &a, e b) {
  a.first %= b;
  a.second %= b;
}
template <class c, class d, class e, class f>
void operator%=(pair<c, d> &a, pair<e, f> b) {
  a.first %= b.first;
  a.second %= b.second;
}
template <class c, class d, class e, class f>
auto operator^(pair<c, d> a, pair<e, f> b)
    -> decltype(make_pair(a.first ^ b.first, a.second ^ b.second)) {
  return {a.first ^ b.first, a.second ^ b.second};
}
template <class c, class d, class e,
          class = typename enable_if<!is_same<c, muu>::value>::type>
auto operator^(c a, pair<d, e> b)
    -> decltype(make_pair(a ^ b.first, a ^ b.second)) {
  return {a ^ b.first, a ^ b.second};
}
template <class c, class d, class e>
auto operator^(pair<c, d> a, e b)
    -> decltype(make_pair(a.first ^ b, a.second ^ b)) {
  return {a.first ^ b, a.second ^ b};
}
template <class c, class d, class e>
void operator^=(pair<c, d> &a, e b) {
  a.first ^= b;
  a.second ^= b;
}
template <class c, class d, class e, class f>
void operator^=(pair<c, d> &a, pair<e, f> b) {
  a.first ^= b.first;
  a.second ^= b.second;
}
template <class c, class d, class e, class f>
auto operator|(pair<c, d> a, pair<e, f> b)
    -> decltype(make_pair(a.first | b.first, a.second | b.second)) {
  return {a.first | b.first, a.second | b.second};
}
template <class c, class d, class e,
          class = typename enable_if<!is_same<c, muu>::value>::type>
auto operator|(c a, pair<d, e> b)
    -> decltype(make_pair(a | b.first, a | b.second)) {
  return {a | b.first, a | b.second};
}
template <class c, class d, class e>
auto operator|(pair<c, d> a, e b)
    -> decltype(make_pair(a.first | b, a.second | b)) {
  return {a.first | b, a.second | b};
}
template <class c, class d, class e>
void operator|=(pair<c, d> &a, e b) {
  a.first |= b;
  a.second |= b;
}
template <class c, class d, class e, class f>
void operator|=(pair<c, d> &a, pair<e, f> b) {
  a.first |= b.first;
  a.second |= b.second;
}
template <class c, class d, class e, class f>
auto operator>>(pair<c, d> a, pair<e, f> b)
    -> decltype(make_pair(a.first >> b.first, a.second >> b.second)) {
  return {a.first >> b.first, a.second >> b.second};
}
template <class c, class d, class e,
          class = typename enable_if<!is_same<c, muu>::value>::type>
auto operator>>(c a, pair<d, e> b)
    -> decltype(make_pair(a >> b.first, a >> b.second)) {
  return {a >> b.first, a >> b.second};
}
template <class c, class d, class e>
auto operator>>(pair<c, d> a, e b)
    -> decltype(make_pair(a.first >> b, a.second >> b)) {
  return {a.first >> b, a.second >> b};
}
template <class c, class d, class e>
void operator>>=(pair<c, d> &a, e b) {
  a.first >>= b;
  a.second >>= b;
}
template <class c, class d, class e, class f>
void operator>>=(pair<c, d> &a, pair<e, f> b) {
  a.first >>= b.first;
  a.second >>= b.second;
}
template <class c, class d, class e, class f>
auto operator<<(pair<c, d> a, pair<e, f> b)
    -> decltype(make_pair(a.first << b.first, a.second << b.second)) {
  return {a.first << b.first, a.second << b.second};
}
template <class c, class d, class e,
          class = typename enable_if<!is_same<c, muu>::value>::type>
auto operator<<(c a, pair<d, e> b)
    -> decltype(make_pair(a << b.first, a << b.second)) {
  return {a << b.first, a << b.second};
}
template <class c, class d, class e>
auto operator<<(pair<c, d> a, e b)
    -> decltype(make_pair(a.first << b, a.second << b)) {
  return {a.first << b, a.second << b};
}
template <class c, class d, class e>
void operator<<=(pair<c, d> &a, e b) {
  a.first <<= b;
  a.second <<= b;
}
template <class c, class d, class e, class f>
void operator<<=(pair<c, d> &a, pair<e, f> b) {
  a.first <<= b.first;
  a.second <<= b.second;
}
template <class c, class d, class e, class f>
auto operator&(pair<c, d> a, pair<e, f> b)
    -> decltype(make_pair(a.first & b.first, a.second &b.second)) {
  return {a.first & b.first, a.second & b.second};
}
template <class c, class d, class e,
          class = typename enable_if<!is_same<c, muu>::value>::type>
auto operator&(c a, pair<d, e> b)
    -> decltype(make_pair(a & b.first, a &b.second)) {
  return {a & b.first, a & b.second};
}
template <class c, class d, class e>
auto operator&(pair<c, d> a, e b)
    -> decltype(make_pair(a.first & b, a.second &b)) {
  return {a.first & b, a.second & b};
}
template <class c, class d, class e>
void operator&=(pair<c, d> &a, e b) {
  a.first &= b;
  a.second &= b;
}
template <class c, class d, class e, class f>
void operator&=(pair<c, d> &a, pair<e, f> b) {
  a.first &= b.first;
  a.second &= b.second;
}
template <class c, class d, class e, class f>
auto operator&&(pair<c, d> a, pair<e, f> b)
    -> decltype(make_pair(a.first && b.first, a.second &&b.second)) {
  return {a.first && b.first, a.second && b.second};
}
template <class c, class d, class e,
          class = typename enable_if<!is_same<c, muu>::value>::type>
auto operator&&(c a, pair<d, e> b)
    -> decltype(make_pair(a && b.first, a &&b.second)) {
  return {a && b.first, a && b.second};
}
template <class c, class d, class e>
auto operator&&(pair<c, d> a, e b)
    -> decltype(make_pair(a.first && b, a.second &&b)) {
  return {a.first && b, a.second && b};
}
template <class c, class d, class e, class f>
auto operator||(pair<c, d> a, pair<e, f> b)
    -> decltype(make_pair(a.first || b.first, a.second || b.second)) {
  return {a.first || b.first, a.second || b.second};
}
template <class c, class d, class e,
          class = typename enable_if<!is_same<c, muu>::value>::type>
auto operator||(c a, pair<d, e> b)
    -> decltype(make_pair(a || b.first, a || b.second)) {
  return {a || b.first, a || b.second};
}
template <class c, class d, class e>
auto operator||(pair<c, d> a, e b)
    -> decltype(make_pair(a.first || b, a.second || b)) {
  return {a.first || b, a.second || b};
}
template <class c, class d>
auto operator-(pair<c, d> e) -> decltype(make_pair(-e.first, -e.second)) {
  return {-e.first, -e.second};
}
template <class c, class d>
auto operator+(pair<c, d> e) -> decltype(make_pair(+e.first, +e.second)) {
  return {+e.first, +e.second};
}
template <class c, class d>
auto operator~(pair<c, d> e) -> decltype(make_pair(~e.first, ~e.second)) {
  return {~e.first, ~e.second};
}
template <class c, class d>
auto operator!(pair<c, d> e) -> decltype(make_pair(!e.first, !e.second)) {
  return {!e.first, !e.second};
}
const int nax = 1e5 + 44;
int b[nax], g[nax];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  for (typename remove_cv<typename remove_reference<decltype(n)>::type>::type
           i = 0;
       i < n; ++i)
    scanf("%d", b + i);
  for (typename remove_cv<typename remove_reference<decltype(m)>::type>::type
           j = 0;
       j < m; ++j)
    scanf("%d", g + j);
  sort(b, b + n);
  sort(g, g + m);
  ll ans = 0;
  if (b[n - 1] > g[0]) return 0 * printf("-1\n");
  for (typename remove_cv<typename remove_reference<decltype(n)>::type>::type
           i = 0;
       i < n; ++i)
    ans += b[i] * 1ll * m;
  (muu() << "\033[1;" << 30 + 198 % 8 << "m" << __FUNCTION__ << "#" << 198
         << ": \033[" << 30 + (int)(198 * 3.125) % 8 << "m")
      << "["
         "ans"
         ": "
      << (ans) << "] ";
  for (typename remove_cv<typename remove_reference<decltype(m)>::type>::type
           i = 0;
       i < m; ++i) {
    ans += g[i] - b[(b[n - 1] == g[0]) || i ? n - 1 : n - 2];
    (muu() << "\033[1;" << 30 + 201 % 8 << "m" << __FUNCTION__ << "#" << 201
           << ": \033[" << 30 + (int)(201 * 3.125) % 8 << "m")
        << "["
           "g"
           "["
           "i"
           ": "
        << (i)
        << "] "
           ": "
        << g[i]
        << "] "
           "["
           "b"
           "["
           "i ? n - 1 : n - 2"
           ": "
        << (i ? n - 1 : n - 2)
        << "] "
           ": "
        << b[i ? n - 1 : n - 2] << "] ";
  }
  printf("%lld\n", ans);
}
