// Задача ""
// ??-ая Интернет-олимпиада сезона 2008-2009, базовый уровень
// Автор задачи: Федор Царев, tsarev@rain.ifmo.ru
// Автор решения: Сергей Поромов, poromov@rain.ifmo.ru

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

public class roads_sp implements Runnable {

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

	public void run() {
		try {
			Locale.setDefault(Locale.US);
			br = new BufferedReader(new FileReader(FILENAME + ".in"));
			out = new PrintWriter(FILENAME + ".out");
			solve();
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	BufferedReader br;
	PrintWriter out;
	StringTokenizer st;
	boolean eof;

	String nextToken() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				eof = true;
				return "0";
			}
		}
		return st.nextToken();
	}

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

	void myAssert(boolean e, String s) {
		if (!e) {
			throw new Error("Assertion failure " + s);
		}
	}
	
	Random random = new Random(this.hashCode());

	private static final String FILENAME = "roads";
	
	int sorttype = 0;
	
	class Point implements Comparable<Point> {
		double x, y;
		int n;
		
		Point(double x, double y, int n) {
			this.x = x;
			this.y = y;
			this.n = n;
		}
		
		void rotate(double ang) {
			double tx = x;
			double ty = y;
			x = tx * Math.cos(ang) - ty * Math.sin(ang);
			y = tx * Math.sin(ang) + ty * Math.cos(ang);
		}

		@Override
		public int compareTo(Point o) {
			if (sorttype == 0) {
				if (x < o.x) return -1;
				if (x > o.x) return 1;
			} else {
				if (n < o.n) return -1;
				if (n > o.n) return 1;
			}
			return 0;
		}
		
		@Override
		public String toString() {
			return x + " " + y;
		}
	}
	
	double eps = 1e-9;
	
	double len(Point p1, Point p2) {
		return Math.sqrt((p1.x - p2.x) * (p1.x - p2.x) + (p1.y - p2.y) * (p1.y - p2.y));
	}
	
	public void solve() {
		int n = nextInt();
		int m = nextInt();
		Point[] p = new Point[n];
		for (int i = 0; i < n; i++) {
			int x = nextInt();
			int y = nextInt();
			p[i] = new Point(x, y, i);
		}
		ArrayList<Integer>[] G = new ArrayList[n];
		for (int i = 0; i < n; i++) {
			G[i] = new ArrayList<Integer>();
		}
		double sumlen = 0;
		for (int i = 0; i < m; i++) {
			int a = nextInt() - 1;
			int b = nextInt() - 1;
			sumlen += len(p[a], p[b]);
			G[a].add(b);
			G[b].add(a);
		}
		while (true) {
			double ang = random.nextDouble() * Math.PI;
			for (Point pp : p) {
				pp.rotate(ang);
			}
			sorttype = 0;
			Arrays.sort(p);
			boolean fl = false;
			for (int i = 0; i < n - 1; i++) {
				if (p[i + 1].x - p[i].x < eps) {
					fl = true;
					break;
				}
			}
			if (fl) {
				for (Point pp : p) {
					pp.rotate(-ang);
				}
				sorttype = 1;
				Arrays.sort(p);
				continue;
			}
			int[] per = new int[n];
			for (int i = 0; i < n; i++) {
				per[p[i].n] = i;
			}
			double[] plus = new double[n];
			double[] minus = new double[n];
			for (int i = 0; i < n; i++) {
				for (int j : G[p[i].n]) {
					double len = len(p[i], p[per[j]]) / Math.abs(p[i].x - p[per[j]].x);
					if (per[j] < i) {
						minus[i] += len;
					} else {
						plus[i] += len;
					}
				}
			}
			double len = 0;
			double pl = plus[0];
			for (int i = 1; i < n; i++) {
				if (len + pl * (p[i].x - p[i - 1].x) > sumlen / 2) {
					double xx = p[i].x + (sumlen / 2 - (len + pl * (p[i].x - p[i - 1].x))) / pl;
					Point p1 = new Point(xx, -10, 0);
					Point p2 = new Point(xx, 10, 0);
					p1.rotate(-ang);
					p2.rotate(-ang);
					out.println(p1);
					out.println(p2);
					return;
				}
				len += pl * (p[i].x - p[i - 1].x);
				pl += plus[i] - minus[i];
			}
			return;
		}
	}
}
