Python Intuitive 100%
```python\nclass Solution:\n    def numPrimeArrangements(self, n: int) -> int:\n        def Fact(n):\n            if n==1:\n                return 1\n          
```python\nclass Solution:\n    def numPrimeArrangements(self, n: int) -> int:\n        def Fact(n):\n            if n==1:\n                return 1\n            else:\n                return n*Fact(n-1)\n        def isprime(n):\n            for i in range(2,int(math.sqrt(n))+1):\n                if n%i==0:\n                    return False\n            return True\n        def Prime(n):\n            count=0\n            for i in range(2,n+1):\n                if isprime(i):\n                    count+=1\n            return count\n        if n<3:\n            return 1\n        a = Prime(n)\n        b = n - a\n        return (Fact(a)*Fact(b)%1000000007+1000000007)%1000000007
[]