#include <bits/stdc++.h>
using namespace std;
int n, m, a, ar[100010], pr[100010];
bool _cl(int k) {
  int i, j, d, t;
  for (i = 0, j = n - k, d = a; j < n; ++i, ++j) {
    if (ar[j] >= pr[i]) continue;
    d -= (pr[i] - ar[j]);
    if (d < 0) return 0;
  }
  return 1;
};
void cl() {
  int i, j, k, b, e, t;
  scanf("%d %d %d", &n, &m, &a);
  for (i = 0; i < n; scanf("%d", &ar[i++]))
    ;
  for (i = 0; i < m; scanf("%d", &pr[i++]))
    ;
  for (sort(ar, ar + n), sort(pr, pr + m), b = 0, e = min(n, m); b <= e;) {
    t = (b + e) >> 1;
    if (_cl(t))
      k = t, b = t + 1;
    else
      e = t - 1;
  }
  for (t = 0, i = 0; i < k; t += pr[i++])
    ;
  printf("%d %d\n", k, max(0, t - a));
};
int main() {
  cl();
  return 0;
};
