#include <bits/stdc++.h>
using namespace std;
long long personal[100005], bike[100005], shared;
long long cost(long long pos) {
  long long res = 0, i;
  for (i = 0; i <= pos; i++) {
    if (personal[pos - i] < bike[i]) res += bike[i] - personal[pos - i];
  }
  return res;
}
long long result(long long pos) {
  long long res = 0, i;
  for (i = 0; i <= pos; i++) res += bike[i];
  if (shared >= res) return 0;
  return res - shared;
}
int main() {
  long long n, m, i, j, low, mid, high, ans;
  cin >> n >> m >> shared;
  for (i = 0; i < n; i++) scanf("%d", &personal[i]);
  for (i = 0; i < m; i++) scanf("%d", &bike[i]);
  sort(personal, personal + n, greater<long long>());
  sort(bike, bike + m);
  low = 0, high = min(n, m);
  while (low < high) {
    mid = (low + high) / 2;
    ans = cost(mid);
    if (ans > shared)
      high = mid;
    else
      low = mid + 1;
  }
  cout << low << " " << result(low - 1);
  return 0;
}
