#include #include #include using namespace std; int gcd(int x,int y){return y?gcd(y,x%y):x;} int lcm(int x,int y){return x/gcd(x,y)*y;} int main(){ int n,s=0; scanf("%d",&n); vector >v(n); for(int i=0;i