class Solution {
public:
int gcd(int a,int b)
{
if(b==0)
return a;
return gcd(b,a%b);
}
vector<string> simplifiedFractions(int n) {
vector<string>res;
for(int i=1;i<=n;i++)
{
for(int j=1;j<=i;j++)
{
if(gcd(i,j)!=1)
{
continue;
}
else
{
string temp=to_string(j)+"/"+to_string(i);
if(temp=="1/1")
continue;
res.push_back(temp);
}
}
}
return res;
}
};