请以Python代码的形式生成一个计算个人所得税的程序，要求程序能够根据税前工资和五险一金扣除后的工资自动计算个人所得税，并输出税后工资。
user
```python
import sys

def calculate_tax(pre_tax_salary, after_insurance_salary):
    tax_rates = [
        (0, 3000, 0.03, 0),
        (3000, 12000, 0.1, 210),
        (12000, 25000, 0.2, 1410),
        (25000, 35000, 0.25, 2660),
        (35000, 55000, 0.3, 4410),
        (55000, 80000, 0.35, 7160),
        (80000, sys.maxsize, 0.45, 15160)
    ]
    
    taxable_income = after_insurance_salary - 5000
    if taxable_income <= 0:
        return 0, pre_tax_salary
    
    for rate in tax_rates:
        if rate[0] < taxable_income <= rate[1]:
            tax = taxable_income * rate[2] - rate[3]
            after_tax_salary = pre_tax_salary - tax
            return tax, after_tax_salary

pre_tax_salary = float(input("请输入税前工资: "))
after_insurance_salary = float(input("请输入五险一金扣除后的工资: "))

tax, after_tax_salary = calculate_tax(pre_tax_salary, after_insurance_salary)
print(f"个人所得税: {tax:.2f}")
print(f"税后工资: {after_tax_salary:.2f}")
```
assistant