On the theoretical strength limit of the layered elastic and viscoelastic composites in compression