#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100010;
struct Problem {
  int a;
  int id;
  bool operator<(const Problem& right) const { return this->a < right.a; }
} problems[MAXN];
int n, m, s;
struct Student {
  int b, c;
  int id;
};
struct StudentCompareByB {
  bool operator()(const Student& A, const Student& B) const {
    return A.b < B.b;
  }
} studentCompareByB;
class StudentCompareByC {
 public:
  bool operator()(const Student& A, const Student& B) const {
    return A.c > B.c;
  }
} studentCompareByC;
Student students[MAXN];
bool isDayGood(int days, vector<int>& match) {
  priority_queue<Student, vector<Student>, StudentCompareByC> availableStudents;
  match.clear();
  match.resize(m, 0);
  int pos = n - 1;
  int pass = 0;
  for (int i = m - 1; i >= 0; i--) {
    while (pos >= 0 && students[pos].b >= problems[i].a) {
      availableStudents.push(students[pos]);
      pos--;
    }
    if (availableStudents.size() == 0) return false;
    Student pick = availableStudents.top();
    availableStudents.pop();
    pass += pick.c;
    if (pass > s) return false;
    for (int j = 0; j < days && i - j >= 0; j++) {
      match[problems[i - j].id - 1] = pick.id;
    }
    i = i - days + 1;
  }
  return true;
}
int main() {
  while (cin >> n >> m >> s) {
    for (int i = 0; i < m; i++) {
      cin >> problems[i].a;
      problems[i].id = i + 1;
    }
    sort(problems, problems + m);
    for (int i = 0; i < n; i++) {
      cin >> students[i].b;
      students[i].id = i + 1;
    }
    for (int i = 0; i < n; i++) cin >> students[i].c;
    sort(students, students + n, studentCompareByB);
    int l = 1, r = m + 1;
    vector<int> match;
    while (l < r) {
      int m = (l + r) >> 1;
      if (isDayGood(m, match)) {
        r = m;
      } else {
        l = m + 1;
      }
    }
    if (l == m + 1) {
      cout << "NO" << endl;
    } else {
      isDayGood(l, match);
      cout << "YES" << endl;
      for (int i = 0; i < match.size(); i++) {
        if (i) cout << " ";
        cout << match[i];
      }
      cout << endl;
    }
  }
}
