Long ago, I read a sci-fi dystopian YA novel about some kids who live under ground in "slum" where workers work under harsh conditions. The kids visit level 1, which is at the bottom of the "hive" and has all the machines that make the world work, water, sewage and trash management etc.
The kids try to find the top floor, since they are numbered from the bottom up, and eventually find the surface of the (earth?) and find the people living there in paradise, have enslaved the people below.
I think I read it in school, so it must be over 30 years old.
Can anyone help me find the author+title of this book?

