You've 8 values, the least of which is 5. This limits your usage to a maximum of 8.
You've 8 values, the greatest of which is 30. This limits your usage to a minimum 2.
Any using exactly 2 values? Yes. Try all 64 variations and see what works. You can eliminate many without actually performing the arithmetic.
Any using exactly 3 values? etc.
It's not magic. You have to do a little hunting.