#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 11;
int N, M, A;
int kids[MAXN];
int price[MAXN];
bool check(int pos) {
  long long need = 0;
  for (int i = 0; i < pos; ++i) {
    int kid = kids[i];
    int pr = price[pos - 1 - i];
    need += max(0, pr - kid);
  }
  return need <= A;
}
int main() {
  scanf("%d %d %d", &N, &M, &A);
  for (int i = 0; i < N; ++i) {
    scanf("%d", &kids[i]);
  }
  for (int i = 0; i < M; ++i) {
    scanf("%d", &price[i]);
  }
  sort(kids, kids + N, std::greater<int>());
  sort(price, price + M);
  int l, r, s;
  l = 0;
  r = min(N, M) + 1;
  s = 0;
  while (r - l > 1) {
    int mid = l + (r - l) / 2;
    if (check(mid)) {
      l = mid;
    } else {
      r = mid;
    }
  }
  if (l == 0) {
    printf("0 0\n");
  } else {
    int ksum = 0;
    long long need = 0;
    for (int i = 0; i < l; ++i) {
      int kid = kids[i];
      int pr = price[l - 1 - i];
      need += max(0, pr - kid);
      ksum += min(pr, kid);
    }
    int leftover = A - need;
    printf("%d %d\n", l, max(ksum - leftover, 0));
  }
  return 0;
}
