#include <bits/stdc++.h>
using namespace std;
const int maxn = 200000;
long long b[maxn], c[maxn];
long long n, m, a;
int cmp(int aa, int bb) { return aa > bb; }
int solve(int mid) {
  long long i, j;
  long long cnt = a;
  for (i = mid, j = 1; i >= 1; i--, j++) {
    if (b[i] < c[j]) {
      cnt -= (c[j] - b[i]);
    }
  }
  if (cnt >= 0) {
    return 1;
  } else {
    return 0;
  }
}
int main() {
  scanf("%lld%lld%lld", &n, &m, &a);
  long long i;
  for (i = 1; i <= n; i++) {
    scanf("%lld", &b[i]);
  }
  for (i = 1; i <= m; i++) {
    scanf("%lld", &c[i]);
  }
  long long l = 0, r = min(n, m);
  sort(b + 1, b + n + 1, cmp);
  sort(c + 1, c + m + 1);
  long long ans = 0;
  while (l <= r) {
    long long mid = (l + r) / 2;
    if (solve(mid) == 1) {
      ans = mid;
      l = mid + 1;
    } else {
      r = mid - 1;
    }
  }
  printf("%lld", ans);
  long long sum = 0;
  for (i = 1; i <= ans; i++) {
    sum += c[i];
  }
  if (sum - a < 0)
    printf(" 0\n");
  else
    printf(" %lld\n", sum - a);
}
