#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const long long M = 1e9 + 7;
int main() {
  int n, m;
  scanf("%d", &n);
  scanf("%d", &m);
  vector<pair<int, int> > ans;
  pair<int, int> l = {1, 1}, r = {n, m};
  while (l <= r) {
    if (l == r) {
      ans.push_back(l);
      break;
    }
    ans.push_back(l);
    ans.push_back(r);
    l.second++;
    r.second--;
    if (l.second == m + 1) {
      l.first++;
      l.second = 1;
      r.first--;
      r.second = m;
    }
  }
  for (pair<int, int> it : ans) {
    printf("%d %d\n", it.first, it.second);
  }
}
