    /* Great things never come from comfort zones,
    "whatever the mind of a man can conceive and believe,it can achieve." */
     
    #include <bits/stdc++.h>

   // #include <ext/pb_ds/assoc_container.hpp>
  //  #include <ext/pb_ds/tree_policy.hpp>

    using namespace std;

  //  using namespace __gnu_pbds;
  //  using ordered_set = tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update>;
  
 
    void my_dbg() { cout << endl; }
    template<typename Arg, typename... Args> void my_dbg(Arg A, Args... B) 
    { cout << ' ' << A; my_dbg(B...); }
    #define dbg(...) cout << "(" << #__VA_ARGS__ << "):", my_dbg(__VA_ARGS__)
 
    #define ll long long
    #define dd long double
    #define scf(n) scanf("%d",&n)
    #define lscf(n) scanf("%lld",&n)
    #define lpri(n) printf("%lld ",n)
    #define pri(n) printf("%d ",(int)n)
    #define prin(n) printf("%d\n",(int)n)
    #define lprin(n) printf("%lld\n",n)
    #define rep(i,ini,n) for(int i=ini;i<(int)n;i++)
    #define show(a) for(auto xy: a) pri(xy); printf("\n");
 
    #define pb push_back
    #define mp make_pair
    #define F first
    #define S second
    #define all(x)     x.begin(),x.end()
    #define SET(a,b) memset(a,b,sizeof(a))
    #define tc   int tt; scf(tt); while(tt--)
 
    #define inf INT_MAX
    #define ninf INT_MIN
    #define gcd __gcd
    #define bitcount(n) __builtin_popcount(n)
 
    const int mod=1e9+7;

    const int N = 1e6+7;


 int main()
 {
    ll x; lscf(x);

    while(x%2==0)
        x/=2;

    vector<ll>v;

    int c=0;

    for(ll i=1;i*i<=x;i++)
    {
        if(x%i==0)
        {
            if(x!=i*i)
                c+=2;   

            else
                c++;
        }
    }

    prin(2*c);



 }
    

    
        


   


     



        
#include <bits/stdc++.h>
#define pb push_back
#define mp make_pair
#define sz(a) ((int)a.size())
#define re return
#define all(a) a.begin(),a.end()
#define int long long
#define Type int
#define rept(i,a,b) for(int i=(a);i<(b);i++)
#define rep(i,a) rept(i,0,a)
using namespace std;
const int dx[4]={-1,1,0,0};
const int dy[4]={0,0,-1,1};
int a[100005];
int b[100005];
int n,ans;
signed main()
{
	cin>>n;
	rep(i,n){
		cin>>a[i];
	}
	rep(i,n){
		cin>>b[i];
		ans+=a[i]*b[i];
	}
	if (ans==0) cout<<"Yes";
	else cout<<"No";
	re 0;
}
