#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T &t) {
  char v = getchar();
  T f = 1;
  t = 0;
  while (!isdigit(v)) {
    if (v == '-') f = -1;
    v = getchar();
  }
  while (isdigit(v)) {
    t = t * 10 + v - 48;
    v = getchar();
  }
  t *= f;
}
template <typename T, typename... Args>
inline void read(T &t, Args &...args) {
  read(t);
  read(args...);
}
const int N = 100010;
int n, m, k, b[N], p[N];
inline bool cmp(int x, int y) { return x > y; }
bool check(int x) {
  int nk = k, pos = x;
  for (int i = 1; i <= x; ++i) {
    if (b[i] < p[pos--]) {
      nk = nk + b[i] - p[pos + 1];
    }
    if (nk < 0) return 0;
  }
  return nk >= 0 ? 1 : 0;
}
int main() {
  read(n, m, k);
  for (int i = 1; i <= n; ++i) read(b[i]);
  for (int i = 1; i <= m; ++i) read(p[i]);
  sort(b + 1, b + 1 + n, cmp);
  sort(p + 1, p + 1 + m);
  int l = 0, r = min(n, m), ans = 0;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (check(mid))
      ans = mid, l = mid + 1;
    else
      r = mid - 1;
  }
  int sum = 0;
  for (int i = 1; i <= ans; ++i) sum += p[i];
  printf("%d %d", ans, max(0, sum - k));
  return 0;
}
