SPOJ CLASSICAL PRIME1