Ram sold tp shyam an article with 20 percent profit .Shyam sold same article for rs.504 with 5percent profit to ghanshyam.How did it cost for eam?​