#include <bits/stdc++.h>
using namespace std;
const long double eps = 1e-9;
const int maxn = 2e5;
const long long inf = 1e9 + 7;
int n, m, a, she[maxn], coast[maxn];
bool comp(int a, int b) { return a > b; }
bool check(int m) {
  long long bud = 0;
  for (int i = m - 1; i >= 0; i--) {
    bud = bud + (long long)max(coast[m - 1 - i] - she[i], 0);
  }
  if (bud > (long long)a)
    return false;
  else
    return true;
}
int ffind(int l, int r) {
  int m = (l + r + 1) / 2;
  if (l == r) {
    return l;
  }
  if (check(m)) {
    return ffind(m, r);
  } else {
    return ffind(l, m - 1);
  }
}
int main() {
  scanf("%d%d%d", &n, &m, &a);
  for (int i = 0; i < n; i++) {
    scanf("%d", &she[i]);
  }
  sort(she, she + n, comp);
  for (int i = 0; i < m; i++) {
    scanf("%d", &coast[i]);
  }
  sort(coast, coast + m);
  int an = ffind(0, min(n, m));
  long long an1 = 0;
  for (int i = 0; i < an; i++) {
    an1 = an1 + (long long)coast[i];
  }
  an1 -= a;
  an1 = max(an1, (long long)0);
  cout << an << ' ' << an1;
  return 0;
}
