#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<int, pair<int, int> > a, pair<int, pair<int, int> > b) {
  if (a.first < b.first)
    return true;
  else if (a.first == b.first) {
    if (a.second > b.second) return true;
    return false;
  }
  return false;
}
int main() {
  int n;
  cin >> n;
  if (n < 10) {
    cout << 1 << "\n" << n;
    return 0;
  }
  int numofdiv, div = -1, otherdiv = -1, rem = -1;
  for (int i = 2; i <= 9; i++) {
    if (n % i == 0) {
      div = i;
      otherdiv = n / i;
    }
  }
  if (div == -1) {
    cout << n << "\n";
    for (int i = 0; i < n; i++) cout << 1 << " ";
    return 0;
  }
  cout << otherdiv << "\n";
  for (int i = 0; i < otherdiv; i++) cout << div << " ";
}
