import java.util.Arrays; import java.util.Collections; import java.util.Scanner; /** * Created by btk on 2017/10/13. */ public class Main { public static void main(String[] args){ Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int[] a = new int[n]; for (int i = 0; i < n; i++) { a[i] = sc.nextInt(); } Arrays.sort(a); int front = a[0]; int back = a[n-1]; if(front == back){ if(2*(n-1)==front){ System.out.println(n+" "+0); } else{ System.out.println(0+" "+n); } } else{ int m = (back-(n-1)*2)/2; System.out.println(n-m+" "+m); } sc.close(); } }