Solution by: Andrew Ross, age 17, Dr. Challoner's Grammar School

solution.