Please answer the lawyer.

Hello. Your problem is not that complicated. If I put it simply, you'll understand.

1. When both parties sign an agreement, if a clause in the agreement is illegal, the illegal clause will be invalid. For example, if A has the capacity for criminal liability, the clause exempting A from criminal liability in AB's agreement is invalid and cannot object to the court's decision. Because criminal liability is the state's responsibility to hold criminals accountable, rather than B's holding A accountable, B can only hold A's civil liability, and similarly, B can exempt A from civil liability. Therefore, the civil compensation part agreed in clauses B and A is valid, but the criminal part is invalid.

The key point in understanding this issue is that a contract can only bind both parties, but cannot bind the parties and the country. Moreover, the invalidity of one clause in the contract does not affect the validity of other clauses.

Note: Compensation is civil liability. If civil liability is exempted, A does not need to compensate B...

I hope my answer will be helpful to you.