Uva 11498 – Division of Nlogonia

Solution actually simple…You have to think simple

here is the cartesian co ordinate link check here then think
http://www.mathsisfun.com/data/cartesian-coordinates.html

Code with one technique

Code with another technique