Bernstein and Nikolskii inequalities for Erdos weights