#include <bits/stdc++.h>
long long a[200100], b[200100];
struct qaq {
  int num;
  long long t, g;
  qaq(int num, long long t) {
    this->num = num;
    this->t = t;
    g = t / b[num];
  }
  qaq() {}
  friend bool operator<(qaq x, qaq y) { return x.g < y.g; }
  friend bool operator>(qaq x, qaq y) { return x.g > y.g; }
} heap[200100];
int N = 0;
void push(qaq x) {
  heap[++N] = x;
  int i = N;
  while (i > 1 && heap[i] < heap[i >> 1]) {
    qaq t = heap[i];
    heap[i] = heap[i >> 1];
    heap[i >> 1] = t;
    i >>= 1;
  }
}
void pop() {
  heap[1] = heap[N--];
  int i = 1;
  while ((i << 1) <= N &&
         (heap[i] > heap[i << 1] || heap[i] > heap[i << 1 | 1])) {
    if ((i << 1) == N || heap[i << 1] < heap[i << 1 | 1]) {
      qaq t = heap[i];
      heap[i] = heap[i << 1];
      heap[i << 1] = t;
      i <<= 1;
    } else {
      qaq t = heap[i];
      heap[i] = heap[i << 1 | 1];
      heap[i << 1 | 1] = t;
      i = i << 1 | 1;
    }
  }
}
int n, k;
bool check(long long x) {
  N = 0;
  for (int i = 1; i <= n; ++i) push(qaq(i, a[i]));
  for (int i = 0; i < k; ++i) {
    qaq u = heap[1];
    pop();
    if (u.t / b[u.num] < i) return false;
    u.t += x;
    push(qaq(u.num, u.t));
  }
  if (N) {
    qaq u = heap[1];
    if (u.t / b[u.num] < k - 1) return false;
  }
  return true;
}
int main() {
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; ++i) scanf("%I64d", &a[i]);
  for (int i = 1; i <= n; ++i) scanf("%I64d", &b[i]);
  long long l = 0, r = 2000000000000ll, mid;
  while (l < r) {
    mid = (l + r) >> 1;
    if (check(mid))
      r = mid;
    else
      l = mid + 1;
  }
  if (l == 2000000000000ll)
    puts("-1");
  else
    printf("%I64d\n", l);
  return 0;
}
