#include <bits/stdc++.h>
using namespace std;
int n, m, d, a[100005], b[100005], l, r;
int main() {
  scanf("%d%d%d", &n, &m, &d);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]), a[i] = -a[i];
  for (int i = 1; i <= m; i++) scanf("%d", &b[i]);
  sort(a + 1, a + 1 + n);
  sort(b + 1, b + 1 + m);
  l = 0, r = min(n, m);
  while (l < r) {
    int mid = l + r + 1 >> 1;
    long long ret = 0;
    for (int i = 1; i <= mid; i++) ret += max(a[i] + b[mid - i + 1], 0);
    if (ret > d)
      r = mid - 1;
    else
      l = mid;
  }
  printf("%d ", l);
  for (int i = 1; i <= l; i++) d -= b[i];
  printf("%d\n", max(-d, 0));
}
