A company decides to drain the water heater to flush out sediments. The water heater has a capacity of 500 gallons. It drains 100 gallons in 20 minutes. After 20 minutes, they open another drain valve and it drains 200 gallons in the next 20 minutes. The drain valves are closed for 10 minutes, while the workers take a break and then the water heater is drained until the water heater is completely empty.

What are the domain and the range of this relation?

The piecewise function represents time in minutes on the x-axis and water in gallons on the y-axis. The function starts from (0, 500), (20, 400), (40, 200), (50, 200), and (70, 0).
x ≥ 0
0 ≤ y ≤ 70
0 ≤ y ≤ 500
y ≥ 0
0 ≤ x ≤ 70
0 ≤ x ≤ 500

The domain of the relation is 0 ≤ x ≤ 70 and the range is 0 ≤ y ≤ 500.