#include <iostream>
using namespace std;
int main() {
    cout << "please enter the age of takahanshi :" << endl;
    int A, B;
    cin >> A;
    cout << "please enter the cost of ferris wheel for adult:" << endl;
    cin >> B;
    if (A >= 13) {
        cout << "the age of takahanshi now is " << A << " and it costs " << B << endl;
    }
    else if (A > 6 && A < 12) {
        cout << "the age of takahanshi now is " << A << " and it costs " << B / 2 << endl;

    }
    else if (A <= 5) {
        cout << "the age of takahanshi now is " << A << " and he can ride the ferris wheel for free" << endl;
    }
}