#include <stdio.h>

int isprime(int n){
  int i;
  for(i=2;i<n/2;i++){
    if (n%i==0) return i;
  }
  return 1;
}
int main(void){
  int num ;  int result;
  printf("input num\n") ;
  
  scanf("%d", &num);

  result = isprime(num);
  if (result==1) printf("%d is prime number (素数)\n", num);
  else printf("%d is not prime. %d is a divisor.\n ", num, result);
  return 0;
}




