Prime number in Swift