Cutest problem I've ever seen. If anyone still doesn't understand, it basically comes down to removing "unique" products and sum from the possibility space.
Here is some python code that might be more revealing https://www.online-python.com/c5nAfLoIqr
A code review would be greatly appreciated!