import java.util.Scanner;
class d010 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while (in.hasNext()) {
int n = in.nextInt();
if (num(n) == n) System.out.println("完全數");
else System.out.println(num(n) > n ? "盈數" : "虧數");
}
}
static int num(int n) {
int res = 0;
for (int i = 1; i <= n / 2; i++)
if (n % i == 0)
res += i;
return res;
}
}