public static int getMaxProductOfTwo(int[] array) throws Exception {
			
		if (array.length <= 1) {
			System.out.println("The array should have at least two numbers.");
			throw new Exception();
		}
		
		if (array.length == 2) { return array[0] * array[1]; }
		
		int max = Math.max(array[0], array[1]);
		int secondMax = Math.min(array[0], array[1]);
		
		int min = secondMax;
		int secondMin = max;
		
		for (int i = 2; i <= array.length - 1; i++) {
			if (array[i] >= max) {
				secondMax = max;
				max = array[i];
			} else if (array[i] < max && array[i] > secondMax) {
				secondMax = array[i];
				secondMin = array[i];
			} else if (array[i] <= secondMax) {
				secondMin = min;
				min = array[i];
			}
		}
		
		return Math.max( (max * secondMax), (min * secondMin));
		
	}