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

public class arithm_sm_negd {

	void solve() throws IOException {
		int n = nextInt();
		assert 1 <= n && n <= 100000;
		int[] c = new int[2 * n];
		for (int i = 0; i < c.length; i++) {
			c[i] = nextInt();
			assert Math.abs(c[i]) <= 1e9;
		}
		Arrays.sort(c);
		Random rand = new Random(1);
		while (true) {
			int x, y;
			do {
				x = rand.nextInt(2 * n);
				y = rand.nextInt(2 * n);
			} while (x == y || c[y] < c[x]);
			int a = c[x];
			int delta = c[y] - c[x];
			if (check(c, a, 0)) {
				return;
			}
			for (int i = 1; i * i <= delta; i++) {
				if (delta % i == 0) {
					if (check(c, a, i)) {
						return;
					}
					if (check(c, a, delta / i)) {
						return;
					}
				}
			}
		}
	}

	boolean check(int[] c, int a, int d) {
		if (d == 0) {
			int cnt = 0;
			for (int i = 0; i < c.length; i++) {
				if (c[i] == a) {
					cnt++;
				}
			}
			if (cnt >= c.length / 2) {
				out.println(a + " " + d);
				return true;
			} else {
				return false;
			}
		}
		long min = a;
		long max = a;
		while (contain(c, min - d)) {
			min -= d;
		}
		while (contain(c, max + d)) {
			max += d;
		}
		if ((max - min + d) / d >= c.length / 2) {
			out.println(max + " " + (-d));
			return true;
		} else {
			return false;
		}

	}

	boolean contain(int[] c, long x) {
		if (x < c[0] || x > c[c.length - 1])
			return false;
		return Arrays.binarySearch(c, (int) x) >= 0;
	}

	BufferedReader br;
	StringTokenizer st;
	PrintWriter out;

	final String filename = "arithm";

	public void run() {
		try {
			br = new BufferedReader(new FileReader(filename + ".in"));
			out = new PrintWriter(filename + ".out");
			solve();
			out.close();
		} catch (IOException e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

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

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

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

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