#include<stdio.h> int main() { __int64 n,m,k,i,j,a,b; while(scanf("%I64d%I64d%I64d",&n,&m,&k)!=EOF) { if(n+m-2<k) { printf("-1 "); continue; } a=k+1; b=1; if(k+1>n) { a=n; b=k+2-n; } i=(n/a)*(m/b); a=k+1;b=1; if(k+1>m) { a=m; b=k+2-m; } j=(m/a)*(n/b); printf("%I64d ",i>j?i:j); } return 0; }