Solution by David Ferrone.