#include <iostream>
using namespace std;

/*
inline int factorial(int n)
{
    int x = 1;
    for (;n != 0; n--)
        x *= n;
    return x;
}

inline int factorial(int s, int n)
{
    int x = 1;
    for (;n > s; n--)
        x *= n;
    return x;
}

inline int conbination(int n, int r)
{
    return factorial(n - r, n) / factorial(r);
}

inline int homogeneous(int n, int r)
{
    return conbination(n + r - 1, r);
}
*/

int calc(int n, int k)
{
    if (k == 0)
        return 0;

    for (int i = 0; i <= 9; i++) {
        n -= i;
        if (n < 0)
            return 0;
        else
            return 1 + calc(n, k - 1);
    }

}

int main()
{
    for (int n; cin >> n;)
        cout << n << " " << calc(n, 4) << endl;

    return 0;
}