Surname means your last name. Polish adjectives have different forms for the genders.
Surnames ending in -ski are regarded as adjectives, so they, too, reflect gender with different endings.
The law requires a given name (imię) to indicate the person’s gender. Almost all Polish female names end in a vowel -a, and most male names end in a consonant or a vowel other than a.
There are, however, a few male names that end in a, which are very old and uncommon, such as Barnaba, Bonawentura, Boryna, Jarema, Kosma, Kuba (a diminutive of Jakub) and Saba.
Thus Janowski is the nominative form for a male; Janowska is the same form for a female.
(SKI) = Male
(SKA) = Female