#include <bits/stdc++.h>
using namespace std;
int n, m;
long long a, b[100100], p[100100];
bool check(int num) {
  long long gongfei = 0;
  for (int i = num; i >= 1; i--) {
    if (b[n - num + i] < p[i]) {
      gongfei += p[i] - b[n - num + i];
    }
  }
  return gongfei <= a;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n >> m >> a;
  for (int i = 1; i <= n; i++) cin >> b[i];
  for (int i = 1; i <= m; i++) cin >> p[i];
  sort(b + 1, b + n + 1);
  sort(p + 1, p + m + 1);
  int le = 0, ri = min(n, m);
  int ans = 0;
  while (le <= ri) {
    int mid = (le + ri) / 2;
    if (check(mid)) {
      le = mid + 1;
      ans = mid;
    } else
      ri = mid - 1;
  }
  long long res = 0;
  for (int i = 1; i <= ans; i++) res += p[i];
  cout << ans << ' ' << max(res - a, 0LL) << endl;
  return 0;
}
