Yes, it is possible. If there are 25 people, and you are one person, you can't shake your own hand and have it count as shaking hands with another person. This applies for each of the 25 people. So, you can subtract 1 from 25 and have it be a group of 24 other people that you could shake hands with. 24/3 is 8, which is a whole number so yes, it would be possible.
hope this helps