#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n, m;
  cin >> n >> m;
  vector<vector<long long> > A(n, vector<long long>(m));
  long long i = 1;
  while (i <= (n + 1) / 2) {
    long long j = 1;
    while (j <= m) {
      if (m - j + 1 >= j || i != n - i + 1) {
        cout << i << " " << j << "\n";
      }
      if (m - j + 1 > j || i != n - i + 1) {
        cout << n - i + 1 << " " << m - j + 1 << "\n";
      }
      j++;
    }
    i++;
  }
  return 0;
}
