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

public class lights_bm {
	FastScanner in;
	PrintWriter out;

	int[] dx = { -1, 0, 0, 1 };
	int[] dy = { 0, -1, 1, 0 };

	boolean inside(int x, int y, int w, int h) {
		if (x >= 0 && x < w)
			if (y >= 0 && y < h)
				return true;
		return false;
	}

	class Point {
		int x, y;

		Point(int x, int y) {
			this.x = x;
			this.y = y;
		}
	}

	boolean isOk(int x, int y, int maxSum, int minSum, int maxSub, int minSub,
			int r, int w, int h) {
		if (!inside(x, y, w, h))
			return false;
		if (!(x + y >= maxSum - r))
			return false;
		if (!(x + y <= minSum + r))
			return false;
		if (!(x - y >= maxSub - r))
			return false;
		if (!(x - y <= minSub + r))
			return false;
		return true;
	}

	Point intersec(int maxSum, int minSum, int maxSub, int minSub, int r,
			int w, int h) {
		int x = (maxSum + maxSub + minSum + minSub) / 4;
		int y = (maxSum + minSum - maxSub - minSub) / 4;
		if (isOk(x, y, maxSum, minSum, maxSub, minSub, r, w, h))
			return new Point(x, y);
		if (isOk(x + 1, y, maxSum, minSum, maxSub, minSub, r, w, h))
			return new Point(x + 1, y);
		if (isOk(x, y + 1, maxSum, minSum, maxSub, minSub, r, w, h))
			return new Point(x, y + 1);
		return new Point(-1, -1);
	}

	void solve() {
		int w = in.nextInt();
		int h = in.nextInt();
		int n = in.nextInt();
		int[][] lamps = new int[n][2];
		for (int i = 0; i < n; i++) {
			lamps[i][0] = in.nextInt() - 1;
			lamps[i][1] = in.nextInt() - 1;
		}
		int[][] len = new int[w][h];
		for (int x = 0; x < w; x++)
			for (int y = 0; y < h; y++)
				len[x][y] = w + h - 1;
		ArrayList<Integer> xA = new ArrayList<Integer>();
		ArrayList<Integer> yA = new ArrayList<Integer>();
		for (int i = 0; i < n; i++) {
			xA.add(lamps[i][0]);
			yA.add(lamps[i][1]);
			len[lamps[i][0]][lamps[i][1]] = 0;
		}
		int it = 0;
		while (it < xA.size()) {
			int x = xA.get(it);
			int y = yA.get(it);
			int nextCost = len[x][y] + 1;
			for (int i = 0; i < 4; i++) {
				int nX = x + dx[i];
				int nY = y + dy[i];
				if (inside(nX, nY, w, h)) {
					if (nextCost < len[nX][nY]) {
						len[nX][nY] = nextCost;
						xA.add(nX);
						yA.add(nY);
					}
				}
			}
			it++;
		}
		ArrayList<Point>[] a = new ArrayList[w + h];
		for (int i = 0; i < w + h; i++)
			a[i] = new ArrayList<Point>();
		for (int x = 0; x < w; x++)
			for (int y = 0; y < h; y++)
				a[len[x][y]].add(new Point(x, y));
		int ans = w + h - 1;
		int bestX = 1, bestY = 1;
		int maxSum = -w - h - 1, minSum = w + h + 1;
		int maxSub = -w - h - 1, minSub = w + h + 1;
		while (true) {
			for (Point p : a[ans]) {
				maxSum = Math.max(p.x + p.y, maxSum);
				minSum = Math.min(p.x + p.y, minSum);
				maxSub = Math.max(p.x - p.y, maxSub);
				minSub = Math.min(p.x - p.y, minSub);
			}
			Point p = intersec(maxSum, minSum, maxSub, minSub, ans - 1, w, h);
			if (p.x == -1) {
				break;
			}
			bestX = p.x + 1;
			bestY = p.y + 1;
			ans--;
		}
		out.println(ans);
		out.println(bestX + " " + bestY);
	}

	void run() {
		try {
			in = new FastScanner(new File("lights.in"));
			out = new PrintWriter(new File("lights.out"));

			solve();

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

	void runIO() {

		in = new FastScanner(System.in);
		out = new PrintWriter(System.out);

		solve();

		out.close();
	}

	class FastScanner {
		BufferedReader br;
		StringTokenizer st;

		public FastScanner(File f) {
			try {
				br = new BufferedReader(new FileReader(f));
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
		}

		public FastScanner(InputStream f) {
			br = new BufferedReader(new InputStreamReader(f));
		}

		String next() {
			while (st == null || !st.hasMoreTokens()) {
				String s = null;
				try {
					s = br.readLine();
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (s == null)
					return null;
				st = new StringTokenizer(s);
			}
			return st.nextToken();
		}

		boolean hasMoreTokens() {
			while (st == null || !st.hasMoreTokens()) {
				String s = null;
				try {
					s = br.readLine();
				} catch (IOException e) {
					e.printStackTrace();
				}
				if (s == null)
					return false;
				st = new StringTokenizer(s);
			}
			return true;
		}

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

		long nextLong() {
			return Long.parseLong(next());
		}
	}

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