spoj problem code PRIME1 accepted