#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, m, s;
  cin >> n >> m >> s;
  vector<int> a(m);
  for (auto& v : a) {
    cin >> v;
  }
  vector<int> b(n), c(n);
  for (auto& v : b) {
    cin >> v;
  }
  for (auto& v : c) {
    cin >> v;
  }
  vector<int> aid(m), bid(n);
  iota(aid.begin(), aid.end(), 0);
  iota(bid.begin(), bid.end(), 0);
  sort(aid.begin(), aid.end(), [&](int i1, int i2) { return a[i1] > a[i2]; });
  sort(bid.begin(), bid.end(), [&](int i1, int i2) { return b[i1] > b[i2]; });
  vector<int> cur(m);
  auto comp = [&](int i1, int i2) { return c[i1] < c[i2]; };
  auto check = [&](int d) {
    multiset<int, decltype(comp)> v(comp);
    int student = 0, left = 0, sid;
    ll cost = 0;
    for (int id : aid) {
      while (student < n && b[bid[student]] >= a[id]) {
        v.emplace(bid[student]);
        ++student;
      }
      if (!left && v.empty()) {
        return false;
      }
      if (!left) {
        left = d;
        sid = *v.begin();
        cost += c[sid];
        v.erase(v.begin());
      }
      cur[id] = sid;
      --left;
    }
    return cost <= s;
  };
  int l = 1, r = m;
  vector<int> ans;
  while (l <= r) {
    int m = (l + r) / 2;
    if (check(m)) {
      ans = cur;
      r = m - 1;
    } else {
      l = m + 1;
    }
  }
  if (ans.empty()) {
    cout << "NO\n";
  } else {
    cout << "YES\n";
    for (int v : ans) {
      cout << v + 1 << ' ';
    }
    cout << '\n';
  }
  return 0;
}
