hackerrank program to determine  valid latitude/longitude pairs