#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
inline long long int max(long long int a, long long int b) {
  return ((a > b) ? a : b);
}
inline long long int min(long long int a, long long int b) {
  return ((a > b) ? b : a);
}
inline long long int gcd(long long int a, long long int b) {
  if (b == 0) return a;
  a %= b;
  return gcd(b, a);
}
long long int n, m, s;
vector<pair<long long int, long long int>> a, b;
vector<long long int> c(N), ans(N);
bool check(long long int days) {
  priority_queue<pair<long long int, long long int>,
                 vector<pair<long long int, long long int>>,
                 greater<pair<long long int, long long int>>>
      pq;
  long long int d = 0, x = m - 1, y = n - 1;
  while (x >= 0) {
    while (b[y].first >= a[x].first && y >= 0) {
      pq.push({c[b[y].second], b[y].second});
      y--;
    }
    if (pq.empty()) return false;
    d += pq.top().first;
    for (long long int i = 0; i < days && x >= 0; i++)
      ans[a[x--].second] = pq.top().second;
    pq.pop();
  }
  if (d <= s) return true;
  return false;
}
void sol() {
  cin >> n >> m >> s;
  long long int i, x;
  for (i = 1; i <= m; i++) {
    cin >> x;
    a.push_back({x, i});
  }
  for (i = 1; i <= n; i++) {
    cin >> x;
    b.push_back({x, i});
  }
  for (i = 1; i <= n; i++) cin >> c[i];
  sort(a.begin(), a.end());
  sort(b.begin(), b.end());
  long long int l = 0;
  long long int r = m;
  long long int anss = -1;
  while (l <= r) {
    long long int mid = (l + r) / 2;
    if (check(mid)) {
      r = mid - 1;
      anss = mid;
    } else {
      l = mid + 1;
    }
  }
  if (anss == -1) {
    cout << "NO";
    return;
  }
  check(anss);
  cout << "YES" << endl;
  for (i = 1; i <= m; i++) cout << ans[i] << " ";
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  sol();
}
