Jzzhu has a big rectangular chocolate bar that consists of n × m unit squares. He wants to cut this bar exactly k times. Each cut must meet the following requirements:

  * each cut should be straight (horizontal or vertical); 
  * each cut should go along edges of unit squares (it is prohibited to divide any unit chocolate square with cut); 
  * each cut should go inside the whole chocolate bar, and all cuts must be distinct. 



The picture below shows a possible way to cut a 5 × 6 chocolate for 5 times.

<image>

Imagine Jzzhu have made k cuts and the big chocolate is splitted into several pieces. Consider the smallest (by area) piece of the chocolate, Jzzhu wants this piece to be as large as possible. What is the maximum possible area of smallest piece he can get with exactly k cuts? The area of a chocolate piece is the number of unit squares in it.

Input

A single line contains three integers n, m, k (1 ≤ n, m ≤ 109; 1 ≤ k ≤ 2·109).

Output

Output a single integer representing the answer. If it is impossible to cut the big chocolate k times, print -1.

Examples

Input

3 4 1


Output

6


Input

6 4 2


Output

8


Input

2 3 4


Output

-1

Note

In the first sample, Jzzhu can cut the chocolate following the picture below:

<image>

In the second sample the optimal division looks like this:

<image>

In the third sample, it's impossible to cut a 2 × 3 chocolate 4 times.
#include <bits/stdc++.h>
using namespace std;
long long res = 0;
long long gcd(long long a, long long b) {
  if (max(a, b) == 1 && min(a, b) == 1)
    return a;
  else {
    long long maxx = max(a, b);
    long long minx = min(a, b);
    res += maxx / minx;
    return gcd(minx, (maxx - 1) % minx + 1);
  }
}
long long cnk(long long n, long long k, long long mod) {
  if (k > n) return 0;
  double result = 1;
  long long lal = 0;
  for (long long lol = n; lol > n - k; lol--) {
    result *= lol;
    result /= (n - lol + 1);
  }
  return (long long)result;
}
vector<long long> graph[100000];
vector<long long> vec;
vector<long long> vecis;
vector<pair<pair<int, int>, int> > vec3;
long long log4(long long val) {
  long long lol = 1;
  long long ii = 0;
  if (val == 1) {
    return 1;
  }
  while (lol < val) {
    ii++;
    lol *= 4;
  }
  return ii;
}
bool comp(pair<pair<int, int>, int> a, pair<pair<int, int>, int> b) {
  return a.first.first > b.first.first;
}
string tostr(long long a) {
  ostringstream out;
  out << a;
  return out.str();
}
long long power(long long a, long long b) {
  if (b == 0) return 1;
  if (b % 2 == 0) {
    return power(a, b / 2) * power(a, b / 2);
  } else
    return a * power(a, b - 1);
}
long long tobig(string str) {
  long long res = 0;
  for (long long lol = 0; lol < str.size(); lol++) {
    res += (str[lol] - 48) * power(10, str.size() - 1 - lol);
  }
  return res;
}
int t[1000000][26];
int h;
void update(int v, int tl, int tr, int newval, int pos, int sym) {
  if (tl == tr) {
    t[v][sym] = newval;
    return;
  } else {
    int tm = (tl + tr) >> 1;
    if (pos <= tm) {
      update(v * 2, tl, tm, newval, pos, sym);
    } else {
      update(v * 2 + 1, tm + 1, tr, newval, pos, sym);
    }
  }
  t[v][sym] = t[v * 2][sym] + t[v * 2 + 1][sym];
}
int sum(long long v, int tl, int tr, int l, int r, int sym) {
  cout << v << "\n";
  if (l > r) return 0;
  if (l == tl && r == tr) return t[v][sym];
  int tm = (tl + tr) / 2;
  return sum(v * 2, tl, tm, l, min(r, tm), sym) +
         sum(v * 2 + 1, tm + 1, tr, max(l, tm + 1), r, sym);
}
long long su[100];
vector<bool> prime(200005, true);
vector<int> razn(100005);
long long cel(long long a, long long b) {
  long long res = a / b;
  if (a % b != 0) res++;
  return res;
}
long long mas[10000];
long long mas1[50], mas2[50];
int main() {
  long long a, b, c;
  cin >> a >> b >> c;
  if (a + b < c + 2) {
    cout << -1;
    return 0;
  }
  long long res1 = 0, res2 = 0;
  long long kk = c;
  long long min1 = min(a - 1, c);
  c -= min1;
  res1 = a / (min1 + 1);
  res1 *= b / (c + 1);
  c = kk;
  long long min2 = min(b - 1, c);
  c -= min2;
  res2 = b / (min2 + 1);
  res2 *= a / (c + 1);
  cout << max(res1, res2);
  return 0;
}
