First solution
Second solution