Optimal debt ratio and dividend payment strategies with reinsurance