Alright, it was solved pretty easily. All I had to do was calculate the cut-off points and remove vertices that fall outside [25%, 75%] range.