Tensile and shear strengths of concrete and rock