#include <bits/stdc++.h>
using namespace std;
const int N = 1e2 + 10;
const int mod = 1e9 + 7;
int n, m;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  for (int i = 1; i <= m / 2; ++i) {
    for (int j = 1; j <= n; ++j) {
      cout << j << ' ' << i << "\n";
      cout << n - j + 1 << ' ' << m - i + 1 << "\n";
    }
  }
  if (m % 2 != 0) {
    for (int j = 1; j <= n / 2; ++j) {
      cout << j << ' ' << m / 2 + 1 << "\n";
      cout << n - j + 1 << ' ' << m / 2 + 1 << "\n";
    }
    if (n % 2 != 0) {
      cout << n / 2 + 1 << ' ' << m / 2 + 1 << "\n";
    }
  }
  return 0;
}
