#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 9;
int n, m, sum, b[N], c[N];
struct P {
  int id, a;
  P() {}
  P(int _id, int _a) : id(_id), a(_a) {}
  bool operator<(const P &o) const { return a > o.a; }
};
struct S {
  int id, b, c;
  S() {}
  S(int _id, int _b, int _c) : id(_id), b(_b), c(_c) {}
  bool operator<(const S &o) const { return c > o.c; }
};
bool cmp(const S &a, const S &b) { return a.b > b.b; }
vector<P> p;
vector<S> s;
bool check(int day) {
  priority_queue<S> go;
  long long pass = 0;
  for (int i = 0, j = 0; i < m; i += day) {
    for (; j < n; ++j) {
      if (s[j].b >= p[i].a) {
        go.push(s[j]);
      } else {
        break;
      }
    }
    if (go.empty()) return 0;
    S cnt = go.top();
    go.pop();
    pass += cnt.c;
    for (int k = i; k <= min(i + day - 1, m - 1); ++k) {
      c[p[k].id] = cnt.id;
    }
  }
  if (pass > sum) return 0;
  for (int i = 1; i <= m; ++i) b[i] = c[i];
  return 1;
}
struct T {
  int a;
  bool operator<(const T &o) const { return a > o.a; }
};
int main() {
  scanf("%d%d%d", &n, &m, &sum);
  for (int i = 1; i <= m; ++i) {
    int a;
    scanf("%d", &a);
    p.push_back(P(i, a));
  }
  for (int i = 1; i <= n; ++i) scanf("%d", &b[i]);
  for (int i = 1; i <= n; ++i) {
    int c;
    scanf("%d", &c);
    s.push_back(S(i, b[i], c));
  }
  sort(p.begin(), p.end());
  sort(s.begin(), s.end(), cmp);
  int L = 1, R = m, ans = -1;
  while (L <= R) {
    int mid = (L + R) >> 1;
    if (check(mid))
      R = mid - 1, ans = mid;
    else
      L = mid + 1;
  }
  if (ans == -1)
    puts("NO");
  else {
    puts("YES");
    for (int i = 1; i <= m; ++i) printf("%d ", b[i]);
  }
  return 0;
}
