Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define vi vector<int>
- #define ll long long
- #define pb push_back
- #define mp make_pair
- #define ii pair<int,int>
- long long gcd(long long a, long long b) {
- if (b == 0)
- {
- return a;
- }
- return gcd(b, a%b);
- }
- int main(){
- long long n,m;
- long long k;
- cin >> n;
- cin >> m;
- k = gcd(gcd(n,m),m/gcd(n,m));
- if((k > 1)&&((k!=n)&&(k!=m)))
- printf("Sim\n");
- else
- printf("Nao\n");
- return 0;
- }
- /*
- compilar
- g++ arquivo.cpp -std=c++11 -o executavel
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement