Flexible mechanical metamaterials