#### Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

## Problem Description

Rar the Cat has stumbled upon an interesting SMBC comic.

Given *N*, help Rar the Cat determine the *fouriest* transform of *N*. You are to find out the maximum possible number of fours in any given base, and how many bases can achieve this maximum.

If there are an infinite number of bases that achieve this maximum, output -1.

## Input

The first line of input will contain one integer, *N*.

## Output

The output should contain two integers, the maximum number of 4s and the total number of bases where this is achieved.

## Limits

Subtask 1 (25%): 0 ≤ N ≤ 10^{6}. Only the first number has to be correct.

Subtask 2 (36%): 0 ≤ N ≤ 10^{6}.

Subtask 3 (39%): 0 ≤ N ≤ 10^{14}.

Subtask 4 (0%): Sample Testcases

## Sample Testcase 1

### Input

4

### Output

1 -1

### Explanation

Any base > 4 will have exactly yield exactly one 4.

## Sample Testcase 2

### Input

29

### Output

1 4

### Explanation

Bases 5, 6, 7 and 25 yield exactly one 4.

## Sample Testcase 3

### Input

33684

### Output

4 1

### Explanation

33684 is 4444 in base 20.

### Tags

### Subtasks and Limits

Subtask | Score | #TC | Time | Memory | Scoring |
---|---|---|---|---|---|

1 | 25 | 23 | 1.5s | 64MB | Minimum |

2 | 36 | 23 | 1.5s | 64MB | Minimum |

3 | 39 | 63 | 1.5s | 64MB | Minimum |

4 | 0 | 3 | 1.5s | 64MB | Minimum |

### Judge Compile Command

g++-8 ans.cpp -o fourier -Wall -Wshadow -static -O2 -lm -m64 -s -w -std=gnu++17 -fmax-errors=512