Write a program to determine if two numbers are coprime. A pair of numbers are coprime if their greatest shared factor is 1. For example:
```
20 and 27
Factors of 20: 1, 2, 4, 5, 10, 20
Factors of 27: 1, 3, 9, 27
Greatest shared factor: 1
20 and 27 are coprime```
An example of two numbers that are not coprime:
```
12 and 39
Factors of 12: 1, 2, 3, 4, 6, 12
Factors of 39: 1, 3, 13, 39
Greatest shared factor: 3
12 and 39 are not coprime```
If the two inputs are coprime, your program should return true. If they are not coprime, your program should return false.

The inputs will always be two positive integers between 2 and 99.

Source: codewars | Difficulty: EASY
Tags: Mathematics

Starter code: def are_coprime(n, m):
	

Solutions:
from fractions import gcd

def are_coprime(n, m):
	return gcd(n, m) == 1


def are_coprime(n, m):
	while m > 0:
		(n, m) = (m, n % m)
	return n == 1


from math import gcd

def are_coprime(n, m):
	return gcd(n, m) == 1


from fractions import gcd

def are_coprime(a, b):
	return gcd(a, b) == 1


def are_coprime(n, m):
	factors = lambda n: [i for i in range(1, n + 1) if n % i == 0]
	return sorted(set(factors(n)) & set(factors(m)))[-1] == 1


def are_coprime(n, m):
	num_of_n = [i for i in range(1, n + 1) if n % i == 0]
	for i in range(1, m + 1):
		if m % i == 0:
			if i in num_of_n[1:]:
				return False
	return True


are_coprime = lambda *a: __import__('fractions').gcd(*a) < 2


def are_coprime(n, m):
	return prime_factors(n) & prime_factors(m) == {1}

def prime_factors(n):
	factors = [1]
	d = 2
	while n > 1:
		while n % d == 0:
			factors.append(d)
			n /= d
		d = d + 1
		if d * d > n:
			if n > 1:
				factors.append(n)
			break
	return set(factors)


from fractions import gcd

def are_coprime(n, m):
	return True if gcd(n, m) == 1 else False


def coprime(n, m):
	while n * m:
		if n > m:
			n %= m
		else:
			m %= n
	return max(n, m)

def are_coprime(n, m):
	return coprime(n, m) == 1