INCOME TAXES - Narrative (Details) - USD ($) $ in Thousands |
12 Months Ended | ||
|---|---|---|---|
Aug. 31, 2026 |
Aug. 31, 2025 |
Aug. 31, 2024 |
|
| Operating Loss Carryforwards [Line Items] | |||
| Foreign tax credit carryforward | $ 22,543 | $ 8,251 | |
| Valuation allowance, deferred tax asset, amount | 6,400 | 2,800 | |
| Unrecognized tax benefits, associated accrued interest | 4,200 | 5,700 | $ 3,900 |
| Unrecognized tax benefits that would affect the effective tax rate | 23,200 | 38,500 | 29,100 |
| Cash paid during the year for income taxes, net of refunds | 122,731 | $ 103,167 | $ 157,015 |
| Foreign | |||
| Operating Loss Carryforwards [Line Items] | |||
| Net operating loss carryforwards | 97,900 | ||
| Federal | |||
| Operating Loss Carryforwards [Line Items] | |||
| Net operating loss carryforwards | 15,400 | ||
| State | |||
| Operating Loss Carryforwards [Line Items] | |||
| Net operating loss carryforwards | $ 9,900 | ||