Split the square at different poitns and see if sum of any pair of splitted numbers is equal to n .
r_digits = 0 NEW_LINE while r_digits < count_digits : NEW_LINE INDENT r_digits = r_digits + 1 NEW_LINE eq_parts = ( int ) ( math . pow ( 10 , r_digits ) ) NEW_LINE DEDENT