#include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <string.h> int main() { int n = 0,cnt = 0; scanf("%d",&n); bool *flag = (bool*)malloc(sizeof(bool) * n); int *pri = (int*)malloc(sizeof(int) * n); memset(flag,false,n); memset(pri...