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

public class arithm_sm_slow_10 {

	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);
		String name = this.getClass().getCanonicalName();
		int k1 = name.charAt(name.length() - 2) - '0';
		int f1, t1, d1;
		if (k1 == 0) {
			f1 = 0;
			t1 = 2 * n;
			d1 = 1;
		} else {
			f1 = 2 * n - 1;
			t1 = -1;
			d1 = -1;
		}

		int k2 = name.charAt(name.length() - 1) - '0';
		int f2, t2, d2;
		if (k2 == 0) {
			f2 = 0;
			t2 = 2 * n;
			d2 = 1;
		} else {
			f2 = 2 * n - 1;
			t2 = -1;
			d2 = -1;
		}
		Random rand = new Random(1);

		for (int i = f1; i != t1; i += d1) {
			if (check(c, c[i], 0)) {
				return;
			}
			for (int j = f2; j != t2; j += d2) {
				int x = i;
				if (k1 == 2) {
					x = rand.nextInt(2 * n);
				}
				int y = j;
				if (k2 == 2) {
					y = rand.nextInt(2 * n);
				}
				if (checkAll(c, x, y))
					return;
			}
		}

	}

	private boolean checkAll(int[] c, int x, int y) {
		if (x == y || c[y] < c[x])
			return false;
		int a = c[x];
		int delta = c[y] - c[x];
		for (int i = 1; i * i <= delta; i++) {
			if (delta % i == 0) {
				if (check(c, a, i)) {
					return true;
				}
				if (check(c, a, delta / i)) {
					return true;
				}
			}
		}
		return false;
	}

	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(min + " " + 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_slow_10().run();
	}
}
