#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
const int n_ = 1e5 + 5;
int n, m, a, b[n_], p[n_];
bool ok(int x) {
  long long need = 0;
  for (int i = 0; i < x; i++) need += max(p[x - i - 1] - b[i], 0);
  return need <= a;
}
int main() {
  scanf("%d %d %d", &n, &m, &a);
  for (int i = 0; i < n; i++) scanf("%d", &b[i]);
  for (int i = 0; i < m; i++) scanf("%d", &p[i]);
  sort(b, b + n);
  reverse(b, b + n);
  sort(p, p + m);
  int st = 0, en = min(m, n);
  while (st < en) {
    int mid = (st + en + 1) >> 1;
    if (ok(mid))
      st = mid;
    else
      en = mid - 1;
  }
  for (int i = 0; i < st; i++) a -= p[i];
  printf("%d %d", st, max(-a, 0));
  return 0;
}
