#include <bits/stdc++.h>
using namespace std;
struct node {
  int x, y, z;
  bool operator<(const node& T) const {
    if (x != T.x)
      return x > T.x;
    else if (y != T.y)
      return y < T.y;
    else
      return z < T.z;
  }
} a[100005];
struct node2 {
  int x, y;
  bool operator<(const node2& T) const {
    if (x != T.x)
      return x < T.x;
    else
      return y < T.y;
  }
} work[100005];
int anss[100005];
pair<int, int> P;
priority_queue<pair<int, int> > q;
int main() {
  int n, m, k;
  scanf("%d %d %d", &n, &m, &k);
  for (int i = 1; i <= m; i++) {
    scanf("%d", &work[i].x);
    work[i].y = i;
  }
  sort(work + 1, work + m + 1);
  for (int i = 0; i < n; i++) scanf("%d", &a[i].x);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i].y);
    a[i].z = i + 1;
  }
  sort(a, a + n);
  int low = 1, hi = m, mid, lastwork, can, laststudent, now, ans = m + 1;
  while (hi >= low) {
    mid = (low + hi) >> 1;
    laststudent = 0, lastwork = m, can = 1, now = k;
    while (lastwork != 0) {
      while (a[laststudent].x >= work[lastwork].x && laststudent != n) {
        P.first = a[laststudent].y * -1;
        P.second = a[laststudent].z;
        q.push(P);
        laststudent++;
      }
      if (q.empty() || now < q.top().first * -1) {
        can = 0;
        break;
      } else {
        now -= q.top().first * -1;
        q.pop();
        lastwork = (0 > lastwork - mid) ? 0 : lastwork - mid;
      }
    }
    if (can == 0)
      low = mid + 1;
    else {
      ans = mid;
      hi = mid - 1;
    }
    while (!q.empty()) {
      q.pop();
    }
  }
  if (ans == m + 1)
    printf("NO");
  else {
    printf("YES\n");
    laststudent = 0, lastwork = m, can = 1, now = k;
    while (lastwork != 0) {
      while (a[laststudent].x >= work[lastwork].x && laststudent != n) {
        P.first = a[laststudent].y * -1;
        P.second = a[laststudent].z;
        q.push(P);
        laststudent++;
      }
      now -= q.top().first * -1;
      for (int i = lastwork; i >= lastwork - ans && i != 0; i--) {
        anss[work[i].y] = q.top().second;
      }
      q.pop();
      lastwork = (0 > lastwork - ans) ? 0 : lastwork - ans;
    }
    for (int i = 1; i <= m; i++) printf("%d ", anss[i]);
  }
}
