#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
int n, m;
long long v, a[MAXN], p[MAXN];
bool judge(int x) {
  long long res = 0;
  for (int i = 1; i <= x; ++i) {
    if (a[n - i + 1] < p[x - i + 1]) res += p[x - i + 1] - a[n - i + 1];
    if (res > v) return false;
  }
  return true;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cin >> n >> m >> v;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  for (int i = 1; i <= m; ++i) cin >> p[i];
  sort(a + 1, a + n + 1);
  sort(p + 1, p + m + 1);
  int low = 0, high = min(n, m), ans = -1;
  while (low <= high) {
    int md = (low + high) >> 1;
    if (judge(md)) {
      low = md + 1;
      ans = md;
    } else
      high = md - 1;
  }
  long long sum = 0;
  for (int i = 1; i <= ans; ++i) sum += p[i];
  cout << ans << " " << (sum - v > 0 ? sum - v : 0) << endl;
  return 0;
}
