Yandex.Mail supports two-factor authentication that uses HOTP or TOTP based authenticator app. First you have to setup 2FA from the yandex passport for the web mail. For that you need to have Yandex.Key app installed in your mobile. It's similar to Google's 2FA process except that you have to enter an additional PIN before you can get the auth code from the app. After setting up the 2FA, you can login to the web mail using the code generated by the Yandex.Key.

Now to access the mail using the Yandex.Mail for Android app, you give the code from the Yandex.Key and not using app specific password setup. This is a key difference when you take other apps like Gmail for Android. With Gmail, you have to generate app specific password since it doesn't support verification codes. If you want to access Yandex.Mail using Thunderbird on a desktop, you have to generate app specific password.

Yandex.Mail supports 2FA for the default yandex.ru address as well as custom mail domains hosted at yandex.