// Arup Guha
// 6/6/2023
// Distinguishes between perfect, abundant and deficient numbers.

using namespace std;
#include <iostream>
typedef long long ll;

int main() {

    ll n, sumdiv = 0;
    cin >> n;

    // Stop by square root, add in each divisor this time.
    for (ll i=1; i*i<=n; i++) {
        if (n%i == 0) {
            sumdiv += i;
            if (n/i > i) sumdiv+= (n/i);
        }
    }

    // Ta da!
    if (sumdiv > 2*n)
        cout << n << " is abundant." << endl;
    else if (sumdiv == 2*n)
        cout << n << " is perfect." << endl;
    else
        cout << n << " is deficient." << endl;

    return 0;
}
