Added a second solution to p089, by pseudog from forum