#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 200;
long long p[maxn], b[maxn], a;
int n, m;
bool check(long long x) {
  long long cost = 0;
  for (int i = x - 1, j = n - 1; i >= 0; i--, j--) {
    cost += max(p[i] - b[j], 0ll);
    if (cost > a) {
      return false;
    }
  }
  return true;
}
int main() {
  scanf("%d%d%lld", &n, &m, &a);
  int i;
  for (i = 0; i < n; i++) scanf("%lld", b + i);
  for (i = 0; i < m; i++) scanf("%lld", p + i);
  sort(b, b + n);
  sort(p, p + m);
  long long left = 0, right = min(m, n) + 1, mid;
  while (right - left > 1) {
    mid = (left + right) >> 1;
    if (check(mid))
      left = mid;
    else
      right = mid;
  }
  cout << left << " ";
  long long ans = -a;
  for (i = 0; i < left; i++) {
    ans += p[i];
  }
  ans = max(ans, 0ll);
  cout << ans << endl;
  return 0;
}
