Function to print the desired result if unique solutions exists , otherwise prints no solution or infinite solutions depending upon the input given .
function PrintResult ( a , n , flag ) { document . write ( " " ) ; if ( flag == 2 ) document . write ( " " ) ; else if ( flag == 3 ) document . write ( " " ) ;