CodeWhiz : Love Triangle Question , problem

According to me, the 1st example in this question is wrong , and 9(3+5+1) will exist between 2 and 10 and will satisfy all the given conditions.
Someone , kindly get the error corrected.
Or if maybe , I am thinking wrong , guide me(Obviously , after the contest , because that would be cheating).

Here is the link to that question : https://www.codechef.com/COWH2016/problems/LVTRI

p also had to be a prime number , and 9 isn’t.
I just don’t know what I had thought.
Yes, the question was perfectly alright.

p also had to be a prime number , and 9 isn’t.
I just don’t know what I had thought.
Yes, the question was perfectly alright.

//