## Problem Description and Formulation

The paper company produces two types of paper: lined and unlined paper. The production of each type of paper requires the use of two machines: a printing machine and a scanning machine. The time required for each machine to produce one ream of each type of paper is given as follows:

- Lined paper: 2 minutes on the printing machine and 5 minutes on the scanning machine.
- Unlined paper: 1 minute on the printing machine and 2 minutes on the scanning machine.

The availability of each machine is 400 minutes per day. The profit from selling one ream of lined paper is $5, and one ream of unlined paper is $3.

## Decision Variables

Let \(L\) be the number of reams of lined paper produced and \(U\) be the number of reams of unlined paper produced.

## Objective Function

The objective is to maximize the total profit \(P = 5L + 3U\).

## Constraints

1. **Printing Machine Constraint**: \(2L + U \leq 400\)
2. **Scanning Machine Constraint**: \(5L + 2U \leq 400\)
3. **Non-Negativity Constraints**: \(L \geq 0, U \geq 0\)

## Gurobi Code

```python
import gurobi

def solve_paper_production_problem():
    # Create a new model
    model = gurobi.Model()

    # Define the decision variables
    L = model.addVar(lb=0, name="Lined_Paper")
    U = model.addVar(lb=0, name="Unlined_Paper")

    # Define the objective function
    model.setObjective(5*L + 3*U, gurobi.GRB.MAXIMIZE)

    # Add constraints
    model.addConstr(2*L + U <= 400, name="Printing_Constraint")
    model.addConstr(5*L + 2*U <= 400, name="Scanning_Constraint")

    # Optimize the model
    model.optimize()

    # Check if the model is optimized
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal Solution: Lined Paper = {L.varValue}, Unlined Paper = {U.varValue}")
        print(f"Maximum Profit: ${model.objVal:.2f}")
    else:
        print("The model is infeasible.")

if __name__ == "__main__":
    solve_paper_production_problem()
```