import java.io.*;
import java.util.*;

public class painting_pk {

	BufferedReader br;
	PrintWriter out;
	StringTokenizer st;

	public String nextToken() throws IOException {
		while ((st == null) || (!st.hasMoreTokens()))
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

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

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

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

	public void solve() throws IOException {
		int x0 = nextInt();
		int y0 = nextInt();
		int xn = nextInt();
		int yn = nextInt();
		
		int n = nextInt();
		int[] l = new int[n];
		double sumR = 0;
		for (int i = 0; i < n; i++) {
			l[i]  = nextInt();
			sumR = sumR + l[i];
		}
		double sumL = 0;
		double R = dist(x0, y0, xn, yn);
		for (int i = 0; i < n - 1; i++) {
			sumL += l[i];
			sumR -= l[i];
			
			if (R + Math.min(sumL, sumR) < Math.max(sumL, sumR) || sumL + sumR < R)
				continue;
			
			double a = R * R - sumR * sumR + sumL * sumL;
			a /= 2 * R;
			double h = Math.sqrt(sumL * sumL - a * a);
			double cx = x0 + (xn - x0) / R * a;
			double cy = y0 + (yn - y0) / R * a;
			cx = cx - (yn - y0) / R * h;
			cy = cy + (xn - x0) / R * h;
			
			double tmp = 0;
			out.println("YES");
			out.println(x0 + " " + y0);
			for (int j = 0; j <= i; j++) {
				tmp += l[j];
				out.println(x0 + (cx - x0) / sumL * tmp + " " + (y0 + (cy - y0) / sumL * tmp));
			}
			tmp = 0;
			for (int j = i + 1; j < n; j++) {
				tmp += l[j];
				out.println(cx + (xn - cx) / sumR * tmp + " " + (cy + (yn - cy) / sumR * tmp));
			}
			return;
		}
		out.println("NO");
	}

	private double dist(int x0, int y0, int xn, int yn) {
		return Math.sqrt((xn - x0) * (xn - x0) + (yn - y0) * (yn - y0));
	}

	public void run() {
		try {
			br = new BufferedReader(new InputStreamReader(System.in));
			out = new PrintWriter(System.out);

			br = new BufferedReader(new FileReader("painting.in"));
			out = new PrintWriter("painting.out");

			solve();

			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static void main(String[] args) {
		new painting_pk().run();
	}
}