#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const int mod = inf + 7;
const double eps = 1e-9;
const double pi = acos(-1.0);
const int maxn = (int)1e5 + 11;
int n, m, a;
int b[maxn], p[maxn];
bool ok(int k) {
  vector<int> boys, rent;
  for (int i = 0; i < k; i++) boys.push_back(b[i]);
  for (int i = 0; i < k; i++) rent.push_back(p[i]);
  reverse(boys.begin(), boys.end());
  int second = a;
  for (int i = 0; i < k; i++) {
    if (boys[i] < rent[i]) {
      if (second < rent[i] - boys[i]) return false;
      second -= rent[i] - boys[i];
    }
  }
  return true;
}
int calc(int k) {
  vector<int> boys, rent;
  for (int i = 0; i < k; i++) boys.push_back(b[i]);
  for (int i = 0; i < k; i++) rent.push_back(p[i]);
  reverse(boys.begin(), boys.end());
  int second = a;
  int other = 0;
  for (int i = 0; i < k; i++) {
    if (boys[i] < rent[i]) {
      if (second < rent[i] - boys[i]) assert(false);
      second -= rent[i] - boys[i];
      other += boys[i];
    } else
      other += rent[i];
  }
  return max(0, other - second);
}
int main() {
  scanf("%d%d%d", &n, &m, &a);
  for (int i = 0; i < n; i++) scanf("%d", b + i);
  for (int i = 0; i < m; i++) scanf("%d", p + i);
  sort(b, b + n);
  reverse(b, b + n);
  sort(p, p + m);
  int ans = 0;
  int l = 1, r = min(n, m);
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (ok(mid)) {
      ans = mid;
      l = mid + 1;
    } else
      r = mid - 1;
  }
  printf("%d %d\n", ans, calc(ans));
  return 0;
}
