Easy || Beat 100%🔥🔥 || C++
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```\nclass Solution {\npublic:\n    int mod=1e9+7;\n    long long factorial(int n) {\n        return (n==1 || n==0) ? 1: ((n%mod)*factorial(n - 1))%mod;  \n    } \n    bool isPrime(int n){\n        if (n <= 1)\n            return false;\n        for (int i = 2; i <= n / 2; i++){\n            if (n % i == 0)\n                return false;\n        }\n        return true;\n    }\n    int numPrimeArrangements(int n) {\n        int noOfPrime=0;\n        for(int i=1;i<=n;i++){\n            if(isPrime(i)){\n                noOfPrime++;\n            }\n        }\n        int nonPrime=n-noOfPrime;\n        cout<<noOfPrime<<" "<<nonPrime<<endl;\n        return (factorial(noOfPrime)*factorial(nonPrime))%mod;\n    }\n};\n```
['C++']