### PROBLEM LINK:

**Author:** Shiplu Hawlader

**Tester:** Tasnim Imran Sunny

**Editorialist:** Lalit Kundu

### DIFFICULTY:

CAKEWALK

### PROBLEM:

Given the counts (A and B) of number of entries by two guards, what is the minimum and maximum number of entries that could have happened, given that atleast one of them is always awake.

### QUICK EXPLANATION:

Minimum occurs when they count as much as possible entries together. So the minimum would be the maximum(A,B).

Maximum occurs when each entry was counted only by one guard. So the maximum would be sum of counts of both i.e. A+B.

### EXPLANATION:

A ∪ B is the total number of entries.

To maximise A ∪ B, make A ∩ B = 0, then A ∪ B = sizeof(A)+sizeof(B).

To minimise A ∪ B, make any one set as a subset of other. Then the A ∪ B = maximum(sizeof(A),sizeof(B)).

Pseudo code:

```
a,b=input()
print max(a,b),a+b
```

### AUTHOR’S AND TESTER’S SOLUTIONS:

Author’s solution can be found here.

Tester’s solution can be found here.