A simple criterion for determining the static friction force between nanowires and flat substrates using the most-bent-state method