#include <bits/stdc++.h>
using namespace std;



int main(){
	cin.tie(0)->sync_with_stdio(0);
	cin.exceptions(ios::badbit | ios::failbit);
	int n;
	cin >> n;
	vector<vector<int>> a{{1, 0}};
	for(auto i = 2; i <= n; ++ i){
		vector<vector<int>> b;
		for(auto v: a){
			vector<int> vv = v; vv.insert(vv.end(), v.begin(), v.end());
			b.push_back(vv);
			vv = v;
			for(auto &x: v){
				x = !x;
			}
			vv.insert(vv.end(), v.begin(), v.end());
			b.push_back(vv);
		}
		vector<int> v(1 << i, 0);
		for(auto j = 0; j < 1 << i - 1; ++ j){
			v[j] = 1;
		}
		b.push_back(v);
		swap(a, b);
	}
	cout << (int)a.size() << "\n";
	for(auto v: a){
		for(auto x: v){
			x ? cout << "A" : cout << "B";
		}
		cout << "\n";
	}
	return 0;
}

/*

*/

////////////////////////////////////////////////////////////////////////////////////////
//                                                                                    //
//                                   Coded by Aeren                                   //
//                                                                                    //
////////////////////////////////////////////////////////////////////////////////////////
#include<bits/stdc++.h>
#define _GLIBCXX_DEBUG
#define rep(i,n) for (int i = 0; i < (int)(n); i++)
#define Rep(i, j, n) for (ll i = j; i < (n); i++)
#define repr(i, j, n) for (ll i = j; i >= (n); i--)
#define all(v) v.begin(),v.end()
#define puts(i) cout << i << endl
#define INF INT_MAX
#define INFL LLONG_MAX
typedef long long ll;
using namespace std;
#define MOD 1000000007

int main(){
  int n; cin >> n;
  vector<int> x(n),y(n);
  rep(i,n) cin >> x.at(i) >> y.at(i);
  bool ans = false;
  Rep(i,0,n-2){
    Rep(j,i+1,n-1){
      Rep(k,j+1,n){
        int x1 = (x.at(i)-x.at(j));
        int y1 = (y.at(i)-y.at(j));
        int x2 = (x.at(j)-x.at(k));
        int y2 = (y.at(j)-y.at(k));

        if(x1*y2==x2*y1){
          ans = true;
        }
      }
    }
  }

  if(ans==true) puts("Yes");
  else puts("No");
}
