New Prime.java (Time Limit Exceeded)