Fast Enterprises Interview Question

Write pseudo code function to check if a given number is prime or not. Is there anyway you can optimize your given solution?