#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  cin >> n >> m;
  vector<pair<int, int> > V;
  for (int i = 1; i <= n / 2; i++) {
    for (int j = 1; j <= m / 2; j++) {
      V.push_back(make_pair(i, j));
      V.push_back(make_pair(n - i + 1, m - j + 1));
    }
    for (int j = m / 2 + 1; j <= m; j++) {
      V.push_back(make_pair(i, j));
      V.push_back(make_pair(n - i + 1, m - j + 1));
    }
  }
  if (n % 2 == 1) {
    for (int j = 1; j <= m / 2; j++) {
      V.push_back(make_pair(n / 2 + 1, j));
      V.push_back(make_pair(n / 2 + 1, m - j + 1));
    }
    if (m % 2 == 1) {
      V.push_back(make_pair(n / 2 + 1, m / 2 + 1));
    }
  }
  for (int i = 0; i < V.size(); i++) {
    printf("%d %d\n", V[i].first, V[i].second);
  }
  return 0;
}
