Driver code
let arr1 = [ 220 , 284 , 1184 , 1210 , 2 , 5 ] ; let n1 = arr1 . length ; document . write ( countPairs ( arr1 , n1 ) + " " ) ; let arr2 = [ 2620 , 2924 , 5020 , 5564 , 6232 , 6368 ] ; let n2 = arr2 . length ; document . write ( countPairs ( arr2 , n2 ) + " " ) ;