class YamoneyAccount implements Comparable<YamoneyAccount> {

    public static boolean isValidAccountNumber(String source) {
        if (source == null || source.isEmpty() || !isDigit(source)) {
            return false;
        }

        int n = fetchN(source);
        String x = fetchX(source, n);
        if (x == null) {
            return false;
        }
        String y = fetchY(source, n);
        if (y == null) {
            return false;
        }
        String z = fetchZ(source);
        return z != null && calculateRedundancy(x, y).equals(z);

    }

    public  YamoneyAccount(String account);

}