Consider a data structure that has only two functions. extract\_lowerthan\_median() and insert(). How can we design it in a way that the amortized cost for both the operation is O(1)?

Using a 2 tree, a min heap and max heap will ensure that the root of min heap is always the median and allow us to extract an element smaller than median with O(1) cost. However, the insertion would run in O(logn). Since we could amortize these cost there should be a structure which performs both these operations in O(1) where we somehow mask the cost of insertion in extraction but I cant think of anything