How to know if a Spanish word is masculine or feminine. El problema.
Problema is one of a surprisingly long list of Italian nouns that are actually masculine, and take a masculine article (il/un), despite having a feminine-looking form (ending in a).