| SHORT-TERM AND LONG-TERM INVESTMENTS |
SHORT-TERM AND LONG-TERM INVESTMENTS
As of the dates indicated, investments are comprised of the following (in thousands):
| | | | | | | | | | | | | | | | | | April 30, 2017 | | Amortized Cost | | Gross Unrealized Gains | | Gross Unrealized Losses | | Estimated Fair Value | U.S. government obligations: | | | | | | | | Included in short-term investments | $ | 255,042 |
| | $ | — |
| | (233 | ) | | $ | 254,809 |
| Included in long-term investments | 89,987 |
| | — |
| | (135 | ) | | 89,852 |
| | $ | 345,029 |
| | $ | — |
| | $ | (368 | ) | | $ | 344,661 |
| | | | | | | | | Commercial paper: | | | | | | | | Included in short-term investments | $ | 19,970 |
| | — |
| | — |
| | $ | 19,970 |
| | $ | 19,970 |
| | $ | — |
| | $ | — |
| | $ | 19,970 |
|
| | | | | | | | | | | | | | | | | | October 31, 2016 | | Amortized Cost | | Gross Unrealized Gains | | Gross Unrealized Losses | | Estimated Fair Value | U.S. government obligations: | | | | | | | | Included in short-term investments | $ | 260,125 |
| | $ | 140 |
| | $ | (6 | ) | | $ | 260,259 |
| Included in long-term investments | 90,145 |
| | 57 |
| | (30 | ) | | 90,172 |
| | $ | 350,270 |
| | $ | 197 |
| | $ | (36 | ) | | $ | 350,431 |
| | | | | | | | | Commercial paper: | | | | | | | | Included in short-term investments | $ | 14,989 |
| | — |
| | — |
| | $ | 14,989 |
| | $ | 14,989 |
| | $ | — |
| | $ | — |
| | $ | 14,989 |
|
The following table summarizes the final legal maturities of debt investments at April 30, 2017 (in thousands):
| | | | | | | | | | Amortized Cost | | Estimated Fair Value | Less than one year | $ | 275,012 |
| | $ | 274,779 |
| Due in 1-2 years | 89,987 |
| | 89,852 |
| | $ | 364,999 |
| | $ | 364,631 |
|
|