#include <bits/stdc++.h>
using namespace std;
vector<int> b, p;
int n, m, a;
int check(int k) {
  int s = a, f = 0;
  for (int i = 0; i < k; i++) {
    if (b[i] > p[n - k + i] + s) return -1;
    f += min(b[i], p[n - k + i]);
    if (b[i] > p[n - k + i]) s -= b[i] - p[n - k + i];
  }
  f = max(0, f - s);
  return f;
}
int bin(int st, int fin) {
  if (st == fin) return st;
  int med = (st + fin + 1) / 2;
  if (check(med) >= 0)
    return bin(med, fin);
  else
    return bin(st, med - 1);
}
int main() {
  scanf("%d%d%d", &n, &m, &a);
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    p.push_back(x);
  }
  for (int i = 1; i <= m; i++) {
    int x;
    scanf("%d", &x);
    b.push_back(x);
  }
  sort(p.begin(), p.end());
  sort(b.begin(), b.end());
  int ans = bin(0, min(n, m)), ans2 = check(ans);
  printf("%d %d\n", ans, ans2);
  return 0;
}
