Local algorithms for the maximum flow and minimum cut in bounded-degree networks