#include <iostream> #include <set> #include <stdio.h> #include <utility> using namespace std; int main(){ int one,n; while(scanf("%d/%d", &one,&n) == 2){ set<pair<int, int> > s; for(int x=n+1; x<=2*n; ++x){ int jmen = x - n; int cit = x*n; if(cit%jmen == 0){ int y = jmen / cit; s.insert(make_pair(min(x, y), max(x, y))); } } printf("%d\n", s.size()); } }