Mary is now four times as old as her daughter. Four years ago the product of their ages was 40. Find their present ages.