ACM problem 612