If the adjective doesn’t give you a glue, then you look up the dictionary.
Some dictionaries will use m/f as their codes for masculine (m) and feminine (f), but others will use f/b – fireannta agus boireannta (Gaelic for masculine and feminine). Make sure you know which ones your dictionary uses.