import java.util.Arrays;
import java.util.Scanner;
public class Main {
	static Scanner scan=new Scanner(System.in);
	static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}
	static long lcm (int a, int b) {return a*b/gcd(a,b);}
	static int max(int a,int b) {return a>b?a:b;}
	static int min(int a,int b) {return a<b?a:b;}
	static long factorial(int i) {return i==1?1:i*factorial(i-1);}
	static int lower_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static int upper_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static boolean isPrime (int n) {
		if (n==2) return true;
		if (n<2 || n%2==0) return false;
		double d = Math.sqrt(n);
		for (int i=3; i<=d; i+=2)if(n%i==0){return false;}
		return true;
	}
	
	
		public static void main(String[] args) {
			Scanner scan=new Scanner(System.in);
			boolean hai=false,tya=false,midori=false,
					mizi=false,ao=false,ki=false,dai=false,
					aka=false;
			int a=scan.nextInt();
			int b[]=new int[a];
			for(int i=0;i<a;i++)b[i]=scan.nextInt();
			Arrays.sort(b);
			int nount=0;
			for(int i=0;i<a;i++) {
				int c=b[i];
				if(c>=3200) {
					nount++;
				}
				if(c<400) hai=true;
				else if(c<800)tya=true;
				else if(c<1200)midori=true;
				else if(c<1600)mizi=true;
				else if(c<2000)ao=true;
				else if(c<2400)ki=true;
				else if(c<2800)dai=true;
				else if(c<3200)aka=true;
			}
			int cnt=0;
			if(hai)cnt++;
			if(tya)cnt++;
			if(midori)cnt++;
			if(mizi)cnt++;
			if(ao)cnt++;
			if(ki)cnt++;
			if(dai)cnt++;
			if(aka)cnt++;
			int max=cnt+nount;
			if(!hai&&!tya&&!midori&&!mizi&&!ao&&!ki&&!dai&&!aka) {
				cnt++;
			}
			System.out.print(cnt+" ");
			System.out.println(max);
		}
} import java.util.Arrays; Arrays java.util import java.util.Scanner; Scanner java.util public class Main {
	static Scanner scan=new Scanner(System.in);
	static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}
	static long lcm (int a, int b) {return a*b/gcd(a,b);}
	static int max(int a,int b) {return a>b?a:b;}
	static int min(int a,int b) {return a<b?a:b;}
	static long factorial(int i) {return i==1?1:i*factorial(i-1);}
	static int lower_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static int upper_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static boolean isPrime (int n) {
		if (n==2) return true;
		if (n<2 || n%2==0) return false;
		double d = Math.sqrt(n);
		for (int i=3; i<=d; i+=2)if(n%i==0){return false;}
		return true;
	}
	
	
		public static void main(String[] args) {
			Scanner scan=new Scanner(System.in);
			boolean hai=false,tya=false,midori=false,
					mizi=false,ao=false,ki=false,dai=false,
					aka=false;
			int a=scan.nextInt();
			int b[]=new int[a];
			for(int i=0;i<a;i++)b[i]=scan.nextInt();
			Arrays.sort(b);
			int nount=0;
			for(int i=0;i<a;i++) {
				int c=b[i];
				if(c>=3200) {
					nount++;
				}
				if(c<400) hai=true;
				else if(c<800)tya=true;
				else if(c<1200)midori=true;
				else if(c<1600)mizi=true;
				else if(c<2000)ao=true;
				else if(c<2400)ki=true;
				else if(c<2800)dai=true;
				else if(c<3200)aka=true;
			}
			int cnt=0;
			if(hai)cnt++;
			if(tya)cnt++;
			if(midori)cnt++;
			if(mizi)cnt++;
			if(ao)cnt++;
			if(ki)cnt++;
			if(dai)cnt++;
			if(aka)cnt++;
			int max=cnt+nount;
			if(!hai&&!tya&&!midori&&!mizi&&!ao&&!ki&&!dai&&!aka) {
				cnt++;
			}
			System.out.print(cnt+" ");
			System.out.println(max);
		}
} Main static Scanner scan=new Scanner(System.in); scan new Scanner(System.in) static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;} gcd {return b>0?gcd(b,a%b):a;} return b>0?gcd(b,a%b):a; b>0?gcd(b,a%b):a b>0 b 0 gcd(b,a%b) gcd b a%b a b a int a a int b b static long lcm (int a, int b) {return a*b/gcd(a,b);} lcm {return a*b/gcd(a,b);} return a*b/gcd(a,b); a*b/gcd(a,b) a*b a b gcd(a,b) gcd a b int a a int b b static int max(int a,int b) {return a>b?a:b;} max {return a>b?a:b;} return a>b?a:b; a>b?a:b a>b a b a b int a a int b b static int min(int a,int b) {return a<b?a:b;} min {return a<b?a:b;} return a<b?a:b; a<b?a:b a<b a b a b int a a int b b static long factorial(int i) {return i==1?1:i*factorial(i-1);} factorial {return i==1?1:i*factorial(i-1);} return i==1?1:i*factorial(i-1); i==1?1:i*factorial(i-1) i==1 i 1 1 i*factorial(i-1) i factorial(i-1) factorial i-1 i 1 int i i static int lower_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		}
		return high;
		} lower_bound {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		}
		return high;
		} int low=0 low 0 high=a.length; high a.length a a.length while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		} low<high low high {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		} int mid=((high-low)/2)+low; mid ((high-low)/2)+low ((high-low)/2) (high-low) high low 2 low if(a[mid]<=key)low=mid+1;
			else high=mid; a[mid]<=key a[mid] a mid key low=mid+1 low mid+1 mid 1 high=mid high mid return high; high int a[] a int key key static int upper_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		}
		return high;
		} upper_bound {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		}
		return high;
		} int low=0 low 0 high=a.length; high a.length a a.length while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		} low<high low high {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		} int mid=((high-low)/2)+low; mid ((high-low)/2)+low ((high-low)/2) (high-low) high low 2 low if(a[mid]<key)low=mid+1;
			else high=mid; a[mid]<key a[mid] a mid key low=mid+1 low mid+1 mid 1 high=mid high mid return high; high int a[] a int key key static boolean isPrime (int n) {
		if (n==2) return true;
		if (n<2 || n%2==0) return false;
		double d = Math.sqrt(n);
		for (int i=3; i<=d; i+=2)if(n%i==0){return false;}
		return true;
	} isPrime {
		if (n==2) return true;
		if (n<2 || n%2==0) return false;
		double d = Math.sqrt(n);
		for (int i=3; i<=d; i+=2)if(n%i==0){return false;}
		return true;
	} if (n==2) return true; n==2 n 2 return true; true if (n<2 || n%2==0) return false; n<2 || n%2==0 n<2 n 2 n%2==0 n%2 n 2 0 return false; false double d = Math.sqrt(n); d Math.sqrt(n) Math.sqrt Math n for (int i=3; i<=d; i+=2)if(n%i==0){return false;} int i=3; int i=3; i 3 i<=d i d i+=2 i+=2 i 2 if(n%i==0){return false;} if(n%i==0){return false;} n%i==0 n%i n i 0 {return false;} return false; false return true; true int n n public static void main(String[] args) {
			Scanner scan=new Scanner(System.in);
			boolean hai=false,tya=false,midori=false,
					mizi=false,ao=false,ki=false,dai=false,
					aka=false;
			int a=scan.nextInt();
			int b[]=new int[a];
			for(int i=0;i<a;i++)b[i]=scan.nextInt();
			Arrays.sort(b);
			int nount=0;
			for(int i=0;i<a;i++) {
				int c=b[i];
				if(c>=3200) {
					nount++;
				}
				if(c<400) hai=true;
				else if(c<800)tya=true;
				else if(c<1200)midori=true;
				else if(c<1600)mizi=true;
				else if(c<2000)ao=true;
				else if(c<2400)ki=true;
				else if(c<2800)dai=true;
				else if(c<3200)aka=true;
			}
			int cnt=0;
			if(hai)cnt++;
			if(tya)cnt++;
			if(midori)cnt++;
			if(mizi)cnt++;
			if(ao)cnt++;
			if(ki)cnt++;
			if(dai)cnt++;
			if(aka)cnt++;
			int max=cnt+nount;
			if(!hai&&!tya&&!midori&&!mizi&&!ao&&!ki&&!dai&&!aka) {
				cnt++;
			}
			System.out.print(cnt+" ");
			System.out.println(max);
		} main {
			Scanner scan=new Scanner(System.in);
			boolean hai=false,tya=false,midori=false,
					mizi=false,ao=false,ki=false,dai=false,
					aka=false;
			int a=scan.nextInt();
			int b[]=new int[a];
			for(int i=0;i<a;i++)b[i]=scan.nextInt();
			Arrays.sort(b);
			int nount=0;
			for(int i=0;i<a;i++) {
				int c=b[i];
				if(c>=3200) {
					nount++;
				}
				if(c<400) hai=true;
				else if(c<800)tya=true;
				else if(c<1200)midori=true;
				else if(c<1600)mizi=true;
				else if(c<2000)ao=true;
				else if(c<2400)ki=true;
				else if(c<2800)dai=true;
				else if(c<3200)aka=true;
			}
			int cnt=0;
			if(hai)cnt++;
			if(tya)cnt++;
			if(midori)cnt++;
			if(mizi)cnt++;
			if(ao)cnt++;
			if(ki)cnt++;
			if(dai)cnt++;
			if(aka)cnt++;
			int max=cnt+nount;
			if(!hai&&!tya&&!midori&&!mizi&&!ao&&!ki&&!dai&&!aka) {
				cnt++;
			}
			System.out.print(cnt+" ");
			System.out.println(max);
		} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) boolean hai=false hai false tya=false tya false midori=false midori false mizi=false mizi false ao=false ao false ki=false ki false dai=false dai false aka=false; aka false int a=scan.nextInt(); a scan.nextInt() scan.nextInt scan int b[]=new int[a]; b new int[a] a for(int i=0;i<a;i++)b[i]=scan.nextInt(); int i=0; int i=0; i 0 i<a i a i++ i++ i b[i]=scan.nextInt(); b[i]=scan.nextInt() b[i] b i scan.nextInt() scan.nextInt scan Arrays.sort(b) Arrays.sort Arrays b int nount=0; nount 0 for(int i=0;i<a;i++) {
				int c=b[i];
				if(c>=3200) {
					nount++;
				}
				if(c<400) hai=true;
				else if(c<800)tya=true;
				else if(c<1200)midori=true;
				else if(c<1600)mizi=true;
				else if(c<2000)ao=true;
				else if(c<2400)ki=true;
				else if(c<2800)dai=true;
				else if(c<3200)aka=true;
			} int i=0; int i=0; i 0 i<a i a i++ i++ i {
				int c=b[i];
				if(c>=3200) {
					nount++;
				}
				if(c<400) hai=true;
				else if(c<800)tya=true;
				else if(c<1200)midori=true;
				else if(c<1600)mizi=true;
				else if(c<2000)ao=true;
				else if(c<2400)ki=true;
				else if(c<2800)dai=true;
				else if(c<3200)aka=true;
			} {
				int c=b[i];
				if(c>=3200) {
					nount++;
				}
				if(c<400) hai=true;
				else if(c<800)tya=true;
				else if(c<1200)midori=true;
				else if(c<1600)mizi=true;
				else if(c<2000)ao=true;
				else if(c<2400)ki=true;
				else if(c<2800)dai=true;
				else if(c<3200)aka=true;
			} int c=b[i]; c b[i] b i if(c>=3200) {
					nount++;
				} c>=3200 c 3200 {
					nount++;
				} nount++ nount if(c<400) hai=true;
				else if(c<800)tya=true;
				else if(c<1200)midori=true;
				else if(c<1600)mizi=true;
				else if(c<2000)ao=true;
				else if(c<2400)ki=true;
				else if(c<2800)dai=true;
				else if(c<3200)aka=true; c<400 c 400 hai=true hai true if(c<800)tya=true;
				else if(c<1200)midori=true;
				else if(c<1600)mizi=true;
				else if(c<2000)ao=true;
				else if(c<2400)ki=true;
				else if(c<2800)dai=true;
				else if(c<3200)aka=true; c<800 c 800 tya=true tya true if(c<1200)midori=true;
				else if(c<1600)mizi=true;
				else if(c<2000)ao=true;
				else if(c<2400)ki=true;
				else if(c<2800)dai=true;
				else if(c<3200)aka=true; c<1200 c 1200 midori=true midori true if(c<1600)mizi=true;
				else if(c<2000)ao=true;
				else if(c<2400)ki=true;
				else if(c<2800)dai=true;
				else if(c<3200)aka=true; c<1600 c 1600 mizi=true mizi true if(c<2000)ao=true;
				else if(c<2400)ki=true;
				else if(c<2800)dai=true;
				else if(c<3200)aka=true; c<2000 c 2000 ao=true ao true if(c<2400)ki=true;
				else if(c<2800)dai=true;
				else if(c<3200)aka=true; c<2400 c 2400 ki=true ki true if(c<2800)dai=true;
				else if(c<3200)aka=true; c<2800 c 2800 dai=true dai true if(c<3200)aka=true; c<3200 c 3200 aka=true aka true int cnt=0; cnt 0 if(hai)cnt++; hai cnt++ cnt if(tya)cnt++; tya cnt++ cnt if(midori)cnt++; midori cnt++ cnt if(mizi)cnt++; mizi cnt++ cnt if(ao)cnt++; ao cnt++ cnt if(ki)cnt++; ki cnt++ cnt if(dai)cnt++; dai cnt++ cnt if(aka)cnt++; aka cnt++ cnt int max=cnt+nount; max cnt+nount cnt nount if(!hai&&!tya&&!midori&&!mizi&&!ao&&!ki&&!dai&&!aka) {
				cnt++;
			} !hai&&!tya&&!midori&&!mizi&&!ao&&!ki&&!dai&&!aka !dai !ki !ao !mizi !midori !hai&&!tya&&!midori&&!mizi&&!ao&&!ki&&!dai&&!aka !hai hai !tya tya !midori midori !mizi mizi !ao ao !ki ki !dai dai !aka aka {
				cnt++;
			} cnt++ cnt System.out.print(cnt+" ") System.out.print System.out System System.out cnt+" " cnt " " System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
	static Scanner scan=new Scanner(System.in);
	static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}
	static long lcm (int a, int b) {return a*b/gcd(a,b);}
	static int max(int a,int b) {return a>b?a:b;}
	static int min(int a,int b) {return a<b?a:b;}
	static long factorial(int i) {return i==1?1:i*factorial(i-1);}
	static int lower_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static int upper_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static boolean isPrime (int n) {
		if (n==2) return true;
		if (n<2 || n%2==0) return false;
		double d = Math.sqrt(n);
		for (int i=3; i<=d; i+=2)if(n%i==0){return false;}
		return true;
	}
	
	
		public static void main(String[] args) {
			Scanner scan=new Scanner(System.in);
			boolean hai=false,tya=false,midori=false,
					mizi=false,ao=false,ki=false,dai=false,
					aka=false;
			int a=scan.nextInt();
			int b[]=new int[a];
			for(int i=0;i<a;i++)b[i]=scan.nextInt();
			Arrays.sort(b);
			int nount=0;
			for(int i=0;i<a;i++) {
				int c=b[i];
				if(c>=3200) {
					nount++;
				}
				if(c<400) hai=true;
				else if(c<800)tya=true;
				else if(c<1200)midori=true;
				else if(c<1600)mizi=true;
				else if(c<2000)ao=true;
				else if(c<2400)ki=true;
				else if(c<2800)dai=true;
				else if(c<3200)aka=true;
			}
			int cnt=0;
			if(hai)cnt++;
			if(tya)cnt++;
			if(midori)cnt++;
			if(mizi)cnt++;
			if(ao)cnt++;
			if(ki)cnt++;
			if(dai)cnt++;
			if(aka)cnt++;
			int max=cnt+nount;
			if(!hai&&!tya&&!midori&&!mizi&&!ao&&!ki&&!dai&&!aka) {
				cnt++;
			}
			System.out.print(cnt+" ");
			System.out.println(max);
		}
} public class Main {
	static Scanner scan=new Scanner(System.in);
	static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}
	static long lcm (int a, int b) {return a*b/gcd(a,b);}
	static int max(int a,int b) {return a>b?a:b;}
	static int min(int a,int b) {return a<b?a:b;}
	static long factorial(int i) {return i==1?1:i*factorial(i-1);}
	static int lower_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static int upper_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static boolean isPrime (int n) {
		if (n==2) return true;
		if (n<2 || n%2==0) return false;
		double d = Math.sqrt(n);
		for (int i=3; i<=d; i+=2)if(n%i==0){return false;}
		return true;
	}
	
	
		public static void main(String[] args) {
			Scanner scan=new Scanner(System.in);
			boolean hai=false,tya=false,midori=false,
					mizi=false,ao=false,ki=false,dai=false,
					aka=false;
			int a=scan.nextInt();
			int b[]=new int[a];
			for(int i=0;i<a;i++)b[i]=scan.nextInt();
			Arrays.sort(b);
			int nount=0;
			for(int i=0;i<a;i++) {
				int c=b[i];
				if(c>=3200) {
					nount++;
				}
				if(c<400) hai=true;
				else if(c<800)tya=true;
				else if(c<1200)midori=true;
				else if(c<1600)mizi=true;
				else if(c<2000)ao=true;
				else if(c<2400)ki=true;
				else if(c<2800)dai=true;
				else if(c<3200)aka=true;
			}
			int cnt=0;
			if(hai)cnt++;
			if(tya)cnt++;
			if(midori)cnt++;
			if(mizi)cnt++;
			if(ao)cnt++;
			if(ki)cnt++;
			if(dai)cnt++;
			if(aka)cnt++;
			int max=cnt+nount;
			if(!hai&&!tya&&!midori&&!mizi&&!ao&&!ki&&!dai&&!aka) {
				cnt++;
			}
			System.out.print(cnt+" ");
			System.out.println(max);
		}
} Main
import java.util.Arrays;
import java.util.Scanner;
public class Main {
	static Scanner scan=new Scanner(System.in);
	static int gcd (int a, int b) {return b>0?gcd(b,a%b):a;}
	static long lcm (int a, int b) {return a*b/gcd(a,b);}
	static int max(int a,int b) {return a>b?a:b;}
	static int min(int a,int b) {return a<b?a:b;}
	static long factorial(int i) {return i==1?1:i*factorial(i-1);}
	static int lower_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<=key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static int upper_bound(int a[],int key) {
		int low=0,high=a.length;
		while(low<high) {
			int mid=((high-low)/2)+low;
			if(a[mid]<key)low=mid+1;
			else high=mid;
		}
		return high;
		}
	static boolean isPrime (int n) {
		if (n==2) return true;
		if (n<2 || n%2==0) return false;
		double d = Math.sqrt(n);
		for (int i=3; i<=d; i+=2)if(n%i==0){return false;}
		return true;
	}
	
	
		public static void main(String[] args) {
			Scanner scan=new Scanner(System.in);
			boolean hai=false,tya=false,midori=false,
					mizi=false,ao=false,ki=false,dai=false,
					aka=false;
			int a=scan.nextInt();
			int b[]=new int[a];
			for(int i=0;i<a;i++)b[i]=scan.nextInt();
			Arrays.sort(b);
			int nount=0;
			for(int i=0;i<a;i++) {
				int c=b[i];
				if(c>=3200) {
					nount++;
				}
				if(c<400) hai=true;
				else if(c<800)tya=true;
				else if(c<1200)midori=true;
				else if(c<1600)mizi=true;
				else if(c<2000)ao=true;
				else if(c<2400)ki=true;
				else if(c<2800)dai=true;
				else if(c<3200)aka=true;
			}
			int cnt=0;
			if(hai)cnt++;
			if(tya)cnt++;
			if(midori)cnt++;
			if(mizi)cnt++;
			if(ao)cnt++;
			if(ki)cnt++;
			if(dai)cnt++;
			if(aka)cnt++;
			int max=cnt+nount;
			if(!hai&&!tya&&!midori&&!mizi&&!ao&&!ki&&!dai&&!aka) {
				cnt++;
			}
			System.out.print(cnt+" ");
			System.out.println(max);
		}
}