#include <iostream>
using namespace std;

int main() {
    double income, rate = 0, diff = 0;
    cout << "Enter net income: ";
    cin >> income;

    if (income <= 560000) {
        rate = 0.05; diff = 0;
    } else if (income <= 1260000) {
        rate = 0.12; diff = 39200;
    } else if (income <= 2420000) {
        rate = 0.20; diff = 140000;
    } else if (income <= 4530000) {
        rate = 0.30; diff = 382000;
    } else {
        rate = 0.40; diff = 835000;
    }

    double tax = (income * rate) - diff;
    if (tax < 0) tax = 0;

    cout << "Tax Rate: " << (rate * 100) << "%" << endl;
    cout << "Tax Payable: $" << tax << endl;

    return 0;
}