Investment (Income), Net - Investment (Income), Net (Detail) - USD ($) $ in Thousands |
3 Months Ended | 9 Months Ended | ||
|---|---|---|---|---|
Feb. 29, 2024 |
Feb. 28, 2023 |
Feb. 29, 2024 |
Feb. 28, 2023 |
|
| Investment Income, Net [Abstract] | ||||
| Interest (income) | $ (5,914) | $ (2,266) | $ (16,262) | $ (6,805) |
| Net (gain) loss on marketable securities | (10,270) | 429 | (16,496) | 3,241 |
| Dividend (income) | (2,481) | (886) | (3,635) | (2,346) |
| Investment (income), net | $ (18,665) | $ (2,723) | $ (36,393) | $ (5,910) |