import Darwin



func euclid(_ m:Int, _ n:Int) -> (Int,Int) {
    if m% n == 0 {
        return (0,1)
    } else {
        let rs = euclid(n% m, m)
        let r = rs.1 - rs.0 * (n / m)
        let s = rs.0

        return (r,s)
    }
}



func gcd(_ m:Int, _ n:Int) -> Int {
    let rs = euclid(m, n)
    return m * rs.0 + n * rs.1
}



func coprime(_ m:Int, _ n:Int) -> Bool {
    return gcd(m,n) == 1? true: false
}

coprime(14,26)