Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him) said: "There is no prescribed punishment (hadd) except in two (matters)." Then he mentioned something similar.