import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Locale;
import java.util.Random;
import java.util.StringTokenizer;

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

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

	private void run() {
		Locale.setDefault(Locale.US);
		try {
			br = new BufferedReader(new FileReader(FNAME + ".in"));
			out = new PrintWriter(FNAME + ".out");
			solve();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			System.exit(566);
		}
	}

	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 u, String message) {
		if (!u) {
			throw new Error("Assertion failed!!! " + message);
		}
	}

	int nextBoundedInt(int l, int r, String name) {
		int x = nextInt();
		myAssert(l <= x && x <= r, name + " no in bounds!!! " + x + " not in "
				+ l + ".." + r);
		return x;
	}

	String FNAME = "arithm";

	int BOUND = (int) 1e9;

	private void solve() throws IOException {
		int n = nextBoundedInt(1, 100000, "n");
		int[] a = new int[2 * n];
		for (int i = 0; i < a.length; i++) {
			a[i] = nextBoundedInt(-BOUND, BOUND, "a_" + (i + 1));
		}
		Arrays.sort(a);
		c = new int[a.length];
		if (check(a, 0)) {
			return;
		}
		Random rand = new Random(1562654);
		while (true) {
			int k1 = rand.nextInt(2 * n);
			int k2 = rand.nextInt(2 * n - 1);
			if (k2 >= k1) {
				k2++;
			}
			if (k1 > k2) {
				int tmp = k1;
				k1 = k2;
				k2 = tmp;
			}
			int diff = a[k2] - a[k1];
			for (int i = 1; i * i <= diff; i++) {
				if (diff % i == 0) {
					if (check(a, i) || check(a, diff / i)) {
						return;
					}
				}
			}
		}
	}

	int[] c;
	boolean[] u = new boolean[100000];

	private boolean check(int[] a, int d) {
		if (d < u.length && u[d]) {
			return false;
		}
		if (d < u.length) {
			u[d] = true;
		}
		Arrays.fill(c, 0);
		int j = 0;
		for (int i = 0; i < a.length; i++) {
			while (j < i && a[j] + d < a[i]) {
				j++;
			}
			c[i] = 1;
			while (j < i && a[j] + d == a[i]) {
				c[i] = Math.max(c[i], c[j] + 1);
				j++;
			}
		}
		for (int i = 0; i < c.length; i++) {
			if (c[i] >= a.length / 2) {
				out.println((a[i] - (a.length / 2 - 1) * d) + " " + d);
				return true;
			}
		}
		return false;
	}

}
