Added a brute force method and removed main method from Prime