#include <bits/stdc++.h>
using namespace std;
int b[100005], p[100005];
bool check(int k, int n, int m, int a) {
  if (k > m) return false;
  int q = n - k;
  for (int i = 1; i <= k; i++) {
    if (b[q + i] < p[i]) {
      a -= p[i] - b[q + i];
      if (a < 0) return false;
    }
  }
  return true;
}
int calc(int k, int n, int m, int a) {
  int q = n - k;
  int retVal = 0;
  for (int i = 1; i <= k; i++) {
    if (b[q + i] < p[i]) {
      retVal += b[q + i];
      a -= p[i] - b[q + i];
    } else {
      retVal += p[i];
    }
  }
  retVal -= a;
  return retVal < 0 ? 0 : retVal;
}
int main() {
  int n, m, a;
  while (scanf("%d%d%d", &n, &m, &a) > 0) {
    for (int i = 1; i <= n; i++) {
      scanf("%d", &b[i]);
    }
    sort(b + 1, b + n + 1);
    for (int i = 1; i <= m; i++) {
      scanf("%d", &p[i]);
    }
    sort(p + 1, p + m + 1);
    int l = 0, r = n;
    int mid = 0;
    int _mid = 0;
    while (l <= r) {
      mid = (l + r) >> 1;
      if (!check(mid, n, m, a)) {
        r = mid - 1;
      } else {
        l = mid + 1;
        _mid = mid;
      }
    }
    printf("%d %d\n", _mid, calc(_mid, n, m, a));
  }
  return 0;
}
