## A Boring Problem

Points: 12 (partial)
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type

Given two integers and , output the sum of all the common factors of and that are not prime.

#### Constraints

For 20% of the points, . These constraints were arbitrarily chosen for a brute force subtask.

For the remaining 80%, .

#### Sample Input 1

28 14

#### Sample Output 1

15

#### Explanation for Sample 1

Factors of are . Factors of are .

are the common factors, but and are prime numbers so we exclude them.

Adding up the rest, we get .

#### Sample Input 2

27 36

#### Sample Output 2

10

#### Explanation for Sample 2

Factors of are . Factors of are .

are the common factors, but, is a prime number so we exclude it.

Adding up the rest, we get .