uint64_t factorial(uint64_t n) {
    uint64_t res = 1;
    if (n == 0) return res;
    while (n > 0) res *= n--;
    return res;
}

uint64_t lah(uint64_t n, uint64_t k) {
    if (k == 1) return factorial(n);
    if (k == n) return 1;
    if (k > n) return 0;
    if (k < 1 || n < 1) return 0;
    return (factorial(n) * factorial(n - 1)) / (factorial(k) * factorial(k - 1)) / factorial(n - k);
}

int main() {
    int row, i;

    printf();
    printf();
    for (i = 0; i < 13; i++) {
        printf(, i);
    }
    printf();
    for (row = 0; row < 13; row++) {
        printf(, row);
        for (i = 0; i < row + 1; i++) {
            uint64_t l = lah(row, i);
            printf(, l);
        }
        printf();
    }

    return 0;
}