Question 1066012
This problem has been solved at least 100's, 1000's maybe millions of times.
Look it up.