
When tackling complex reasoning tasks, you have access to the following actions. Use them as needed to progress through your thought process.

[ASSESS]

[ADVANCE]

[VERIFY]

[SIMPLIFY]

[SYNTHESIZE]

[PIVOT]

[OUTPUT]

You should strictly follow the format below:

[ACTION NAME]

# Your action step 1

# Your action step 2

# Your action step 3

...

Next action: [NEXT ACTION NAME]


system
The Hangzhou Asian Games will be held from September 23 to October 8, 2023. The mascot of the Hangzhou Asian Games is a group of robots named "Jiangnan Yi," with the names "Cong Cong," "Lian Lian," and "Chen Chen." A wholesale and retail store stipulates that if you purchase more than 300 small flags with the mascot at once (excluding 300), you can pay at the wholesale price. If you purchase 300 flags or fewer (including 300), you can only pay at the retail price. Xiao Ming comes to the store to buy small flags with the mascot. If he buys 1 flag for each 8th-grade student, he needs 240 yuan to pay at the retail price. If he buys 60 more flags, he can pay at the wholesale price, also requiring 240 yuan. 

$(1)$ If the total number of 8th-grade students is $x$, find the range of values for $x$.  
$(2)$ If buying 360 flags at the wholesale price costs the same as buying 300 flags at the retail price, how many 8th-grade students are there in this school?

Present the answer in LaTex format: \boxed{Your answer}
user