Problem: Soon there will be held the world's largest programming contest, but the testing system still has m bugs. The contest organizer, a well-known university, has no choice but to attract university students to fix all the bugs. The university has n students able to perform such work. The students realize that they are the only hope of the organizers, so they don't want to work for free: the i-th student wants to get ci 'passes' in his subjects (regardless of the volume of his work).

Bugs, like students, are not the same: every bug is characterized by complexity aj, and every student has the level of his abilities bi. Student i can fix a bug j only if the level of his abilities is not less than the complexity of the bug: bi ≥ aj, and he does it in one day. Otherwise, the bug will have to be fixed by another student. Of course, no student can work on a few bugs in one day. All bugs are not dependent on each other, so they can be corrected in any order, and different students can work simultaneously.

The university wants to fix all the bugs as quickly as possible, but giving the students the total of not more than s passes. Determine which students to use for that and come up with the schedule of work saying which student should fix which bug.

Input

The first line contains three space-separated integers: n, m and s (1 ≤ n, m ≤ 105, 0 ≤ s ≤ 109) — the number of students, the number of bugs in the system and the maximum number of passes the university is ready to give the students.

The next line contains m space-separated integers a1, a2, ..., am (1 ≤ ai ≤ 109) — the bugs' complexities.

The next line contains n space-separated integers b1, b2, ..., bn (1 ≤ bi ≤ 109) — the levels of the students' abilities.

The next line contains n space-separated integers c1, c2, ..., cn (0 ≤ ci ≤ 109) — the numbers of the passes the students want to get for their help.

Output

If the university can't correct all bugs print "NO".

Otherwise, on the first line print "YES", and on the next line print m space-separated integers: the i-th of these numbers should equal the number of the student who corrects the i-th bug in the optimal answer. The bugs should be corrected as quickly as possible (you must spend the minimum number of days), and the total given passes mustn't exceed s. If there are multiple optimal answers, you can output any of them.

Examples

Input

3 4 9
1 3 1 2
2 1 3
4 3 6


Output

YES
2 3 2 3


Input

3 4 10
2 3 1 2
2 1 3
4 3 6


Output

YES
1 3 1 3


Input

3 4 9
2 3 1 2
2 1 3
4 3 6


Output

YES
3 3 2 3


Input

3 4 5
1 3 1 2
2 1 3
5 3 6


Output

NO

Note

Consider the first sample.

The third student (with level 3) must fix the 2nd and 4th bugs (complexities 3 and 2 correspondingly) and the second student (with level 1) must fix the 1st and 3rd bugs (their complexity also equals 1). Fixing each bug takes one day for each student, so it takes 2 days to fix all bugs (the students can work in parallel).

The second student wants 3 passes for his assistance, the third student wants 6 passes. It meets the university's capabilities as it is ready to give at most 9 passes.

Solution (in JAVA):

Solution:

import java.io.*;
import java.math.*;
import java.util.*;
import java.util.Map.Entry;

import static java.util.Arrays.*;

public class B {
	private static final int mod = (int)1e9+7;

	final Random random = new Random(0);
	final IOFast io = new IOFast();
	
	public void run() throws IOException {
		int n = io.nextInt();
		int m = io.nextInt();
		int s = io.nextInt();
		int[][] complexities = io.nextIntArray2DWithIndex(m, 1);
		int[] abilities = io.nextIntArray(n);
		int[] passes = io.nextIntArray(n);
		
		int[][] student = new int[n][4];
		
		for(int i = 0; i < n; i++) {
			student[i][0] = abilities[i];
			student[i][1] = passes[i];
			student[i][2] = i;
		}
		arrayIntSort(complexities, 0);
		arrayIntSort(student, 0);
		for(int i = 0; i < n; i++) {
			abilities[i] = student[i][0];
		}
		RMQInt rmq = new RMQInt(1<<30);
		rmq.build(n);
		PriorityQueue<int[]> q = new PriorityQueue<>(n, new Comparator<int[]>() {

			@Override
			public int compare(int[] o1, int[] o2) {
				// TODO Auto-generated method stub
				return o1[3] != o2[3] ? o1[3] - o2[3] : o1[1] - o2[1];
			}
		});
		int low = 0, high = m + 2;
		LOOP: while(high - low > 1) {
			int mid = (low + high) / 2;
//			System.err.println(low + " " + high + " " + mid);
			
			for(int i = 0; i < n; i++) {
				student[i][3] = mid;
			}
			
			q.clear();
			long cost = 0;
			for(int i = m - 1, j = n - 1; i >= 0; i--) {
				while(j >= 0 && complexities[i][0] <= student[j][0]) {
//					System.err.println("add: " + mid + " " + q.size() + " " + Arrays.toString(student[j]));
					q.add(student[j--]);
				}
				
				while(!q.isEmpty()) {
					if(q.peek()[3] == mid && cost + q.peek()[1] > s) {
//						System.err.println("bad: " + mid + " " + q.size() + " " + Arrays.toString(q.peek()));
						q.poll();
						continue;
					}
					break;
				}
				
				if(q.isEmpty()) {
					low = mid;
					continue LOOP;
				}
				if(q.peek()[3] == mid) {
					cost += q.peek()[1];
				}
//				System.err.println("use: " + mid + " " + q.size() + " " + Arrays.toString(q.peek()));
				if(--q.peek()[3] == 0) {
					q.poll();
				}
			}
			
			high = mid;
		}

		System.err.println("ans: " + low + " " + high);
		if(low > m) {
			io.out.println("NO");
			return;
		}
		
		io.out.println("YES");
		{
			int mid = high;
			
			for(int i = 0; i < n; i++) {
				student[i][3] = mid;
			}

			q.clear();
			int[] ans = new int[m];
			long cost = 0;
			for(int i = m - 1, j = n - 1; i >= 0; i--) {
				while(j >= 0 && complexities[i][0] <= student[j][0]) {
//					System.err.println("add: " + mid + " " + student[j][1]);
					q.add(student[j--]);
				}
				while(!q.isEmpty()) {
					if(q.peek()[3] == mid && cost + q.peek()[1] > s) {
//						System.err.println("bad: " + mid + " " + q.peek()[1]);
						q.poll();
						continue;
					}
					break;
				}
//				System.err.println(q.size());

				ans[complexities[i][1]] = q.peek()[2] + 1;
				if(q.peek()[3] == mid) {
					cost += q.peek()[1];
				}
				if(--q.peek()[3] == 0) {
					q.poll();
				}
			}
			
			for(int i = 0; i < m; i++) {
				if(i != 0) io.out.print(" ");
				io.out.print(ans[i]);
			}
			io.out.println();
		}
	}
	
	static
	class RMQInt {
		int n;
		int[] xs;
		int[] ys;
		final int INF;

		public RMQInt(int inf) {
			INF = inf;
		}

		int Min(int a, int b) { return a == INF ? b : (b == INF ? a : (a<=b?a:b)); }
		int minIndex(int a, int b) { return a == -1 ? b : (b == -1 ? a : (Min(xs[a], xs[b]) == xs[a] ? a : b)); }

		public void build(int m) {
			for(n = 1; n<m; n<<=1) ;
			xs = new int[2*n];
			ys = new int[2*n];
			for(int i = 0; i < 2*n; i++) {
				ys[i] = i;
			}
			clear();
		}
		
		public void clear() {
			Arrays.fill(xs, INF);
		}

		// idx: [0,n)
		public void Update(int v, int idx) {
			xs[idx += n - 1] = v;
			while(idx > 0) {
				idx = (idx-1)/2;
				xs[idx] = Min(xs[idx*2+1], xs[idx*2+2]);
				ys[idx] = ys[minIndex(idx*2+1, idx*2+2)];
			}
		}

		// [l,r)
		public int Query(int l, int r) { 
			return Query(l, r, 0, n, 0);
		}
		int Query(int l, int r, int a, int b, int k) {
			if(l <= a && b <= r) return xs[k];
			if(b <= l || r <= a) return INF;
			final int m = (a+b)/2;
			return Min(
					Query(l, r, a, m, 2*k+1),
					Query(l, r, m, b, 2*k+2));
		}

		// [l,r)
		public int QueryIndex(int l, int r) { return QueryIndex(l, r, 0, n, 0) - (n - 1); }
		int QueryIndex(int l, int r, int a, int b, int k) {
			if(l <= a && b <= r) return ys[k];
			if(b <= l || r <= a) return -1;
			final int m = (a+b)/2;
			return minIndex(
					QueryIndex(l, r, a, m, 2*k+1),
					QueryIndex(l, r, m, b, 2*k+2));
		}
	}

	
	static void arrayIntSort(int[][] x, int key) {
		Arrays.sort(x, new IntArrayComparator(key));
	}
	
	static class IntArrayComparator implements Comparator<int[]> {
		final int KEY;
		
		public IntArrayComparator(int key) {
			KEY = key;
		}
		
		@Override
		public int compare(int[] o1, int[] o2) {
			return o1[KEY] - o2[KEY];
		}
	}
	
	void main() throws IOException {
		//		IOFast.setFileIO("rle-size.in", "rle-size.out");
		try {
			run();
		}
		catch (EndOfFileRuntimeException e) { }
		io.out.flush();
	}

	public static void main(String[] args) throws IOException {
		new B().main();
	}
	
	static class EndOfFileRuntimeException extends RuntimeException {
		private static final long serialVersionUID = -8565341110209207657L; }

	static
	public class IOFast {
		private BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		private PrintWriter out = new PrintWriter(System.out);

		void setFileIO(String ins, String outs) throws IOException {
			in = new BufferedReader(new FileReader(ins));
			out = new PrintWriter(new FileWriter(outs));
		}

		//		private static final int BUFFER_SIZE = 50 * 200000;
		private static int pos, readLen;
		private static final char[] buffer = new char[1024 * 8];
		private static char[] str = new char[500*8*2];
		private static boolean[] isDigit = new boolean[256];
		private static boolean[] isSpace = new boolean[256];
		private static boolean[] isLineSep = new boolean[256];

		static {
			for(int i = 0; i < 10; i++) { isDigit['0' + i] = true; }
			isDigit['-'] = true;
			isSpace[' '] = isSpace['\r'] = isSpace['\n'] = isSpace['\t'] = true;
			isLineSep['\r'] = isLineSep['\n'] = true;
		}

		public int read() throws IOException {
			if(pos >= readLen) {
				pos = 0;
				readLen = in.read(buffer);
				if(readLen <= 0) { throw new EndOfFileRuntimeException(); }
			}
			return buffer[pos++];
		}

		public int nextInt() throws IOException {
			return Integer.parseInt(nextString());
		}

		public long nextLong() throws IOException {
			return Long.parseLong(nextString());
		}

		public char nextChar() throws IOException {
			while(true) {
				final int c = read();
				if(!isSpace[c]) { return (char)c; }
			}
		}
		
		int reads(int len, boolean[] accept) throws IOException {
			try {
				while(true) {
					final int c = read();
					if(accept[c]) { break; }
					
					if(str.length == len) {
						char[] rep = new char[str.length * 3 / 2];
						System.arraycopy(str, 0, rep, 0, str.length);
						str = rep;
					}
					
					str[len++] = (char)c;
				}
			}
			catch(EndOfFileRuntimeException e) { ; }
			
			return len;
		}
		
		int reads(char[] cs, int len, boolean[] accept) throws IOException {
			try {
				while(true) {
					final int c = read();
					if(accept[c]) { break; }
					cs[len++] = (char)c;
				}
			}
			catch(EndOfFileRuntimeException e) { ; }
			
			return len;
		}

		public char[] nextLine() throws IOException {
			int len = 0;
			str[len++] = nextChar();
			len = reads(len, isLineSep);
			
			try {
				if(str[len-1] == '\r') { len--; read(); }
			}
			catch(EndOfFileRuntimeException e) { ; }
			
			return Arrays.copyOf(str, len);
		}

		public String nextString() throws IOException {
			return new String(next());
		}

		public char[] next() throws IOException {
			int len = 0;
			str[len++] = nextChar();
			len = reads(len, isSpace);
			return Arrays.copyOf(str, len);
		}

		public int next(char[] cs) throws IOException {
			int len = 0;
			cs[len++] = nextChar();
			len = reads(cs, len, isSpace);
			return len;
		}

		public double nextDouble() throws IOException {
			return Double.parseDouble(nextString());
		}

		public long[] nextLongArray(final int n) throws IOException {
			final long[] res = new long[n];
			for(int i = 0; i < n; i++) {
				res[i] = nextLong();
			}
			return res;
		}

		public int[] nextIntArray(final int n) throws IOException {
			final int[] res = new int[n];
			for(int i = 0; i < n; i++) {
				res[i] = nextInt();
			}
			return res;
		}

		public int[][] nextIntArray2D(final int n, final int k) throws IOException {
			final int[][] res = new int[n][];
			for(int i = 0; i < n; i++) {
				res[i] = nextIntArray(k);
			}
			return res;
		}

		public int[][] nextIntArray2DWithIndex(final int n, final int k) throws IOException {
			final int[][] res = new int[n][k+1];
			for(int i = 0; i < n; i++) {
				for(int j = 0; j < k; j++) {
					res[i][j] = nextInt();
				}
				res[i][k] = i;
			}
			return res;
		}

		public double[] nextDoubleArray(final int n) throws IOException {
			final double[] res = new double[n];
			for(int i = 0; i < n; i++) {
				res[i] = nextDouble();
			}
			return res;
		}

	}

}