#include <iostream>
using namespace std;

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

    if (income <= 520000) {
        rate = 0.05; diff = 0;
    } else if (income <= 1170000) {
        rate = 0.12; diff = 36400;
    } else if (income <= 2350000) {
        rate = 0.20; diff = 130000;
    } else if (income <= 4400000) {
        rate = 0.30; diff = 365000;
    } else if (income <= 10000000) {
        rate = 0.40; diff = 805000;
    } else {
        rate = 0.45; diff = 1305000;
    }

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

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

    return 0;
}