const lines = require('fs') .readFileSync('/dev/stdin', 'utf-8') .trim().split('\n').values(); const N = Number(lines.next().value); const a = lines.next().value.split(' ').map(x => Number(x)); const max = Math.max(...a); const crane = a.reduce((a, x) => a + (x === max ? 1 : 0), 0); console.log(crane, N - crane);