solved prime.c