Question 1200665
.


This problem is not so original as somebody may think.


Several TWIN problems were posted and solved at this forum some time ago (several years ago ?)


You may find them (for free) using GOOGLE search, by loading the first line into the search engine.


The problems are not literally the same (the numbers are different), but give a direction and may serve as templates.


I myself am not so inspired to make this routine job, where you (and anybody else) will learn nothing useful.