#include <bits/stdc++.h>
using namespace std;
int n, m, a, b[100005], p[100005], ans;
bool check(int x) {
  int sh = a;
  for (int i = 0; i < x; i++) {
    if (b[n - 1 - i] < p[x - 1 - i]) sh -= (p[x - 1 - i] - b[n - 1 - i]);
    if (sh < 0) return 0;
  }
  return sh >= 0;
}
int main() {
  cin >> n >> m >> a;
  for (int i = 0; i < n; i++) cin >> b[i];
  sort(b, b + n);
  for (int i = 0; i < m; i++) cin >> p[i];
  sort(p, p + m);
  int l = 0, r = min(n, m), mid;
  long long k;
  while (l <= r) {
    mid = (l + r) / 2;
    k = check(mid);
    if (k)
      ans = mid, l = mid + 1;
    else
      r = mid - 1;
  }
  cout << ans << ' ';
  long long cnt = 0;
  for (int i = 0; i < ans; i++) cnt += p[i];
  cout << max(0ll, cnt - a);
  return 0;
}
