#include <bits/stdc++.h>
using namespace std;
long long n, m, s, x, ans[1000000];
vector<pair<long long, long long> > bugs;
vector<pair<long long, pair<long long, long long> > > stu;
set<pair<long long, long long> > mys;
long long solve(long long x) {
  long long sum = 0;
  long long last = 0;
  mys.clear();
  for (int i = 0; i < m; i += x) {
    while (last < n && stu[last].first >= bugs[i].first) {
      mys.insert(stu[last].second);
      last++;
    }
    if (mys.empty()) return (long long)(1000000000000000000);
    pair<long long, long long> temp = *(mys.begin());
    mys.erase(mys.begin());
    sum += temp.first;
    for (int j = i; j < m && j < i + x; j++) {
      ans[bugs[j].second] = temp.second;
    }
  }
  return sum;
}
int main() {
  cin >> n >> m >> s;
  for (int i = 0; i < m; i++) {
    cin >> x;
    bugs.push_back(pair<long long, long long>(x, i));
  }
  for (int i = 0; i < n; i++) {
    cin >> x;
    pair<long long, long long> temp = pair<long long, long long>(0, i);
    stu.push_back(pair<long long, pair<long long, long long> >(x, temp));
  }
  for (int i = 0; i < n; i++) {
    cin >> x;
    stu[i].second.first = x;
  }
  sort(bugs.begin(), bugs.end());
  reverse(bugs.begin(), bugs.end());
  sort(stu.begin(), stu.end());
  reverse(stu.begin(), stu.end());
  int l = 1, r = m + 1;
  while (l < r) {
    int mid = (l + r) / 2;
    if (solve(mid) <= s)
      r = mid;
    else
      l = mid + 1;
  }
  if (l > m) {
    cout << "NO\n";
    return 0;
  }
  solve(l);
  cout << "YES\n";
  for (int i = 0; i < m; i++) cout << ans[i] + 1 << " ";
}
