On minimal Hausdorff and minimal Urysohn functions