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

public class lights_av {

	final String filename = new String("lights").toLowerCase();

	final int INF = Integer.MAX_VALUE / 2;
	final int[] dx = new int[] { 1, -1, 0, 0 };
	final int[] dy = new int[] { 0, 0, -1, 1 };

	int[] find(int[][] dist, int mid) {
		int w = dist.length;
		int h = dist[0].length;
		int minP = -INF, minM = -INF;
		int maxP = INF, maxM = INF;

		for (int i = 0; i < w; i++) {
			for (int j = 0; j < h; j++) {
				if (dist[i][j] > mid) {
					minP = Math.max(minP, i + j - mid);
					minM = Math.max(minM, i - j - mid);
					maxP = Math.min(maxP, i + j + mid);
					maxM = Math.min(maxM, i - j + mid);
				}
			}
		}
		int ansX = -1, ansY = -1;
		for (int i = 0; i < w; i++) {
			for (int j = 0; j < h; j++) {
				if (minP <= i + j && i + j <= maxP &&
						minM <= i - j && i - j <= maxM) {
					ansX = i;
					ansY = j;
				}
			}
		}
		if (ansX == -1) {
			return null;
		}
		return new int[] { ansX, ansY };
	}

	void solve() throws Exception {
		int w = nextInt(), h = nextInt();
		int n = nextInt();

		int[][] dist = new int[w][h];
		for (int[] i : dist) {
			Arrays.fill(i, INF);
		}
		Queue<Integer> q = new ArrayDeque<Integer>();
		for (int i = 0; i < n; i++) {
			int x = nextInt() - 1;
			int y = nextInt() - 1;
			dist[x][y] = 0;
			q.add(x);
			q.add(y);
		}

		while (!q.isEmpty()) {
			int x = q.poll();
			int y = q.poll();
			int d = dist[x][y];
			for (int i = 0; i < 4; i++) {
				int cx = x + dx[i];
				int cy = y + dy[i];
				if (cx >= 0 && cx < w && cy >= 0 && cy < h
						&& dist[cx][cy] == INF) {
					dist[cx][cy] = d + 1;
					q.add(cx);
					q.add(cy);
				}
			}
		}

		int left = -1;
		int right = INF;
//		int right = 3;
		while (left < right - 1) {
			int mid = (left + right) / 2;

			if (find(dist, mid) != null) {
				right = mid;
			} else {
				left = mid;
			}
		}
		
		int[] ans = find(dist, right);
		
		out.println(right);
		out.println((ans[0] + 1) + " " + (ans[1] + 1));
	}

	void run() {
		try {
			in = new BufferedReader(new FileReader(filename + ".in"));
			out = new PrintWriter(filename + ".out");
			// in = new BufferedReader(new InputStreamReader(System.in));
			// out = new PrintWriter(System.out);

			solve();

			out.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	BufferedReader in;
	StringTokenizer st;
	PrintWriter out;

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

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

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

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

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

}
