SPOJ Problem solved.